protects most, if not all, of the Apache macros. This has been tested on
Linux using all of the Unix MPM's. The biggest push was that Apache's
httpd.h header file can no longer include the ap_config.h file. Most of the
other files include this themselves now.
Submitted by: Ryan Bloom and Manoj Kasichainula
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84492
13f79535-47bb-0310-9956-
ffa450edef68
*
*/
+#include "apr_network_io.h"
#include "httpd.h"
#include "http_core.h"
#include "http_config.h"
#include "http_log.h"
#include "http_request.h"
+#include <string.h>
enum allowdeny_type {
T_ENV,
#include "http_request.h"
#include "http_log.h"
#include "http_protocol.h"
-#include "ap_config.h"
#include "ap_ctype.h"
#include "util_uri.h"
#include "util_md5.h"
+#include "ap_mmn.h"
#include "httpd.h"
#include "http_config.h"
#include "http_connection.h"
#include "http_log.h"
#include "http_main.h"
#include "util_script.h"
+#include <sys/stat.h>
+#include <string.h>
+#include <pwd.h>
#endif
#define STARTING_SEQUENCE "<!--#"
#include "http_main.h"
#include "http_request.h"
+#define ASIS_MAGIC_TYPE "httpd/send-as-is"
+
static int asis_handler(request_rec *r)
{
ap_file_t *f = NULL;
#include "http_main.h"
#include "util_script.h"
#include "apr_fnmatch.h"
+#include <string.h>
module MODULE_VAR_EXPORT autoindex_module;
#include "http_log.h"
#include "util_script.h"
#include "http_conf_globals.h"
+#include <sys/stat.h>
+#include <string.h>
module MODULE_VAR_EXPORT cgi_module;
*
*/
-#define CORE_PRIVATE
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_protocol.h"
#include "mpm_status.h"
-#include <time.h>
#ifndef DEFAULT_TIME_FORMAT
#define DEFAULT_TIME_FORMAT "%A, %d-%b-%Y %H:%M:%S %Z"
#endif
+#define STATUS_MAGIC_TYPE "application/x-httpd-status"
+
module MODULE_VAR_EXPORT status_module;
static int print_status_value(void *data, const char *key, const char *val)
#include "http_log.h"
#include "http_request.h"
+#include <string.h>
+
typedef struct handlers_info {
char *name;
} handlers_info;
ap_status_t status;
if (!types_confname)
- types_confname = TYPES_CONFIG_FILE;
+ types_confname = AP_TYPES_CONFIG_FILE;
types_confname = ap_server_root_relative(p, types_confname);
num_names = d->index_names->nelts;
}
else {
- dummy_ptr[0] = DEFAULT_INDEX;
+ dummy_ptr[0] = AP_DEFAULT_INDEX;
names_ptr = dummy_ptr;
num_names = 1;
}
#include "http_main.h"
#include "http_log.h"
#include "util_script.h"
+#include <string.h>
#define IMAP_MAGIC_TYPE "application/x-httpd-imap"
#define MAXVERTS 100
* rst
*/
+#include "apr_file_io.h"
#include "httpd.h"
#include "http_config.h"
#include "http_request.h"
#include "http_core.h"
#include "http_log.h"
#include "util_script.h"
+#include <string.h>
+
+#define MAP_FILE_MAGIC_TYPE "application/x-type-map"
/* Commands --- configuring document caching on a per (virtual?)
* server basis...
static float find_content_length(negotiation_state *neg, var_rec *variant)
{
- struct stat statb;
+ ap_finfo_t statb;
if (variant->bytes == 0) {
char *fullname = ap_make_full_path(neg->pool, neg->dir_name,
variant->file_name);
- if (stat(fullname, &statb) >= 0) {
+ if (ap_stat(&statb, fullname, neg->pool) == APR_SUCCESS) {
/* Note, precision may be lost */
- variant->bytes = (float) statb.st_size;
+ variant->bytes = (float) statb.size;
}
}
#include "httpd.h"
#include "http_config.h"
#include "http_request.h"
+#include <pwd.h>
+
+/* The default directory in user's home dir */
+#ifndef DEFAULT_USER_DIR
+#define DEFAULT_USER_DIR "public_html"
+#endif
module userdir_module;
#include "httpd.h"
#include "http_config.h"
#include "http_request.h"
+#include <stdlib.h>
typedef struct {
ap_table_t *vars;