You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Ben Laurie <be...@hyperreal.com> on 1996/10/20 20:03:47 UTC
cvs commit: apache/src http_config.c http_config.h http_core.c http_log.c http_log.h http_protocol.c http_protocol.h http_request.c http_request.h httpd.h mod_access.c mod_actions.c mod_alias.c mod_auth.c mod_browser.c mod_cgi.c mod_dir.c mod_env.c mod_include.c mod_log_config.c mod_mime.c mod_negotiation.c mod_userdir.c util.c util_script.c
ben 96/10/20 11:03:46
Modified: src http_config.c http_config.h http_core.c http_log.c
http_log.h http_protocol.c http_protocol.h
http_request.c http_request.h httpd.h mod_access.c
mod_actions.c mod_alias.c mod_auth.c mod_browser.c
mod_cgi.c mod_dir.c mod_env.c mod_include.c
mod_log_config.c mod_mime.c mod_negotiation.c
mod_userdir.c util.c util_script.c
Log:
More constification.
Revision Changes Path
1.27 +17 -15 apache/src/http_config.c
Index: http_config.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_config.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C3 -r1.26 -r1.27
*** http_config.c 1996/10/09 15:23:08 1.26
--- http_config.c 1996/10/20 18:03:29 1.27
***************
*** 50,56 ****
*
*/
! /* $Id: http_config.c,v 1.26 1996/10/09 15:23:08 mjc Exp $ */
/*
* http_config.c: once was auxillary functions for reading httpd's config
--- 50,56 ----
*
*/
! /* $Id: http_config.c,v 1.27 1996/10/20 18:03:29 ben Exp $ */
/*
* http_config.c: once was auxillary functions for reading httpd's config
***************
*** 398,406 ****
* invoking the function...
*/
! char *invoke_cmd(command_rec *cmd, cmd_parms *parms, void *mconfig, char *args)
{
! char *w, *w2, *w3, *errmsg;
if ((parms->override & cmd->req_override) == 0)
return pstrcat (parms->pool, cmd->name, " not allowed here", NULL);
--- 398,408 ----
* invoking the function...
*/
! const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms, void *mconfig,
! const char *args)
{
! char *w, *w2, *w3;
! const char *errmsg;
if ((parms->override & cmd->req_override) == 0)
return pstrcat (parms->pool, cmd->name, " not allowed here", NULL);
***************
*** 540,546 ****
}
}
! command_rec *find_command (char *name, command_rec *cmds)
{
while (cmds->name)
if (!strcasecmp (name, cmds->name))
--- 542,548 ----
}
}
! const command_rec *find_command (const char *name, const command_rec *cmds)
{
while (cmds->name)
if (!strcasecmp (name, cmds->name))
***************
*** 551,559 ****
return NULL;
}
! command_rec *find_command_in_modules (char *cmd_name, module **mod)
{
! command_rec *cmdp;
module *modp;
for (modp = *mod; modp; modp = modp->next)
--- 553,561 ----
return NULL;
}
! const command_rec *find_command_in_modules (const char *cmd_name, module **mod)
{
! const command_rec *cmdp;
module *modp;
for (modp = *mod; modp; modp = modp->next)
***************
*** 565,574 ****
return NULL;
}
! char *handle_command (cmd_parms *parms, void *config, char *l)
{
! char *args, *cmd_name, *retval;
! command_rec *cmd;
module *mod = top_module;
++parms->config_line;
--- 567,576 ----
return NULL;
}
! const char *handle_command (cmd_parms *parms, void *config, const char *l)
{
! const char *args, *cmd_name, *retval;
! const command_rec *cmd;
module *mod = top_module;
++parms->config_line;
***************
*** 606,617 ****
return retval;
}
! char *srm_command_loop (cmd_parms *parms, void *config)
{
char l[MAX_STRING_LEN];
while (!(cfg_getline (l, MAX_STRING_LEN, parms->infile))) {
! char *errmsg = handle_command (parms, config, l);
if (errmsg) return errmsg;
}
--- 608,619 ----
return retval;
}
! const char *srm_command_loop (cmd_parms *parms, void *config)
{
char l[MAX_STRING_LEN];
while (!(cfg_getline (l, MAX_STRING_LEN, parms->infile))) {
! const char *errmsg = handle_command (parms, config, l);
if (errmsg) return errmsg;
}
***************
*** 622,628 ****
* Generic command functions...
*/
! char *set_string_slot (cmd_parms *cmd, char *struct_ptr, char *arg)
{
/* This one's pretty generic... */
--- 624,630 ----
* Generic command functions...
*/
! const char *set_string_slot (cmd_parms *cmd, char *struct_ptr, char *arg)
{
/* This one's pretty generic... */
***************
*** 652,658 ****
void process_resource_config(server_rec *s, char *fname, pool *p, pool *ptemp)
{
FILE *cfg;
! char *errmsg;
cmd_parms parms;
fname = server_root_relative (p, fname);
--- 654,660 ----
void process_resource_config(server_rec *s, char *fname, pool *p, pool *ptemp)
{
FILE *cfg;
! const char *errmsg;
cmd_parms parms;
fname = server_root_relative (p, fname);
***************
*** 693,699 ****
{
FILE *f;
cmd_parms parms;
! char *errmsg;
const struct htaccess_result *cache;
struct htaccess_result *new;
void *dc;
--- 695,701 ----
{
FILE *f;
cmd_parms parms;
! const char *errmsg;
const struct htaccess_result *cache;
struct htaccess_result *new;
void *dc;
***************
*** 818,824 ****
if (t != NULL) *t = ':';
}
! server_rec *init_virtual_host (pool *p, char *hostname)
{
server_rec *s = (server_rec *)pcalloc (p, sizeof (server_rec));
server_addr_rec **addrs;
--- 820,826 ----
if (t != NULL) *t = ':';
}
! server_rec *init_virtual_host (pool *p, const char *hostname)
{
server_rec *s = (server_rec *)pcalloc (p, sizeof (server_rec));
server_addr_rec **addrs;
1.17 +6 -6 apache/src/http_config.h
Index: http_config.h
===================================================================
RCS file: /export/home/cvs/apache/src/http_config.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C3 -r1.16 -r1.17
*** http_config.h 1996/10/18 19:23:15 1.16
--- http_config.h 1996/10/20 18:03:30 1.17
***************
*** 50,56 ****
*
*/
! /* $Id: http_config.h,v 1.16 1996/10/18 19:23:15 ben Exp $ */
/*
* The central data structures around here...
--- 50,56 ----
*
*/
! /* $Id: http_config.h,v 1.17 1996/10/20 18:03:30 ben Exp $ */
/*
* The central data structures around here...
***************
*** 79,85 ****
typedef struct command_struct {
char *name; /* Name of this command */
! char *(*func)(); /* Function invoked */
void *cmd_data; /* Extra data, for functions which
* implement multiple commands...
*/
--- 79,85 ----
typedef struct command_struct {
char *name; /* Name of this command */
! const char *(*func)(); /* Function invoked */
void *cmd_data; /* Extra data, for functions which
* implement multiple commands...
*/
***************
*** 149,155 ****
char *path; /* If configuring for a directory,
* pathname of that directory.
*/
! command_rec *cmd; /* configuration command */
} cmd_parms;
/* This structure records the existence of handlers in a module... */
--- 149,155 ----
char *path; /* If configuring for a directory,
* pathname of that directory.
*/
! const command_rec *cmd; /* configuration command */
} cmd_parms;
/* This structure records the existence of handlers in a module... */
***************
*** 239,245 ****
/* Generic command handling function... */
! char *set_string_slot (cmd_parms *, char *, char *);
/* For modules which need to read config files, open logs, etc. ...
* this returns the fname argument if it begins with '/'; otherwise
--- 239,245 ----
/* Generic command handling function... */
! const char *set_string_slot (cmd_parms *, char *, char *);
/* For modules which need to read config files, open logs, etc. ...
* this returns the fname argument if it begins with '/'; otherwise
***************
*** 270,278 ****
int parse_htaccess(void **result, request_rec *r, int override,
char *path, char *file);
! char *srm_command_loop (cmd_parms *parms, void *config);
! server_rec *init_virtual_host (pool *p, char *hostname);
int is_virtual_server (server_rec *);
void process_resource_config(server_rec *s, char *fname, pool *p, pool *ptemp);
--- 270,278 ----
int parse_htaccess(void **result, request_rec *r, int override,
char *path, char *file);
! const char *srm_command_loop (cmd_parms *parms, void *config);
! server_rec *init_virtual_host (pool *p, const char *hostname);
int is_virtual_server (server_rec *);
void process_resource_config(server_rec *s, char *fname, pool *p, pool *ptemp);
1.37 +61 -56 apache/src/http_core.c
Index: http_core.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_core.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -C3 -r1.36 -r1.37
*** http_core.c 1996/10/14 00:18:46 1.36
--- http_core.c 1996/10/20 18:03:30 1.37
***************
*** 50,57 ****
*
*/
- /* $Id: http_core.c,v 1.36 1996/10/14 00:18:46 jim Exp $ */
-
#define CORE_PRIVATE
#include "httpd.h"
#include "http_config.h"
--- 50,55 ----
***************
*** 380,386 ****
* commands, but most of the old srm.conf is in the the modules.
*/
! char *set_access_name (cmd_parms *cmd, void *dummy, char *arg)
{
void *sconf = cmd->server->module_config;
core_server_config *conf = get_module_config (sconf, &core_module);
--- 378,384 ----
* commands, but most of the old srm.conf is in the the modules.
*/
! const char *set_access_name (cmd_parms *cmd, void *dummy, char *arg)
{
void *sconf = cmd->server->module_config;
core_server_config *conf = get_module_config (sconf, &core_module);
***************
*** 389,395 ****
return NULL;
}
! char *set_document_root (cmd_parms *cmd, void *dummy, char *arg)
{
void *sconf = cmd->server->module_config;
core_server_config *conf = get_module_config (sconf, &core_module);
--- 387,393 ----
return NULL;
}
! const char *set_document_root (cmd_parms *cmd, void *dummy, char *arg)
{
void *sconf = cmd->server->module_config;
core_server_config *conf = get_module_config (sconf, &core_module);
***************
*** 404,410 ****
return NULL;
}
! char *set_error_document (cmd_parms *cmd, core_dir_config *conf, char *line)
{
int error_number, index_number;
char *w;
--- 402,409 ----
return NULL;
}
! const char *set_error_document (cmd_parms *cmd, core_dir_config *conf,
! char *line)
{
int error_number, index_number;
char *w;
***************
*** 413,419 ****
* convert it into an array index
*/
! w = getword_conf (cmd->pool, &line);
error_number = atoi(w);
index_number = index_of_response(error_number);
--- 412,418 ----
* convert it into an array index
*/
! w = getword_conf_nc (cmd->pool, &line);
error_number = atoi(w);
index_number = index_of_response(error_number);
***************
*** 440,446 ****
* discards as harmless. Cheesy, but it works.
*/
! char *set_override (cmd_parms *cmd, core_dir_config *d, char *l)
{
char *w;
--- 439,445 ----
* discards as harmless. Cheesy, but it works.
*/
! const char *set_override (cmd_parms *cmd, core_dir_config *d, const char *l)
{
char *w;
***************
*** 468,474 ****
return NULL;
}
! char *set_options (cmd_parms *cmd, core_dir_config *d, char *l)
{
d->opts = OPT_NONE;
while(l[0]) {
--- 467,473 ----
return NULL;
}
! const char *set_options (cmd_parms *cmd, core_dir_config *d, const char *l)
{
d->opts = OPT_NONE;
while(l[0]) {
***************
*** 500,506 ****
return NULL;
}
! char *require (cmd_parms *cmd, core_dir_config *c, char *arg)
{
require_line *r;
--- 499,505 ----
return NULL;
}
! const char *require (cmd_parms *cmd, core_dir_config *c, char *arg)
{
require_line *r;
***************
*** 513,521 ****
return NULL;
}
! char *limit (cmd_parms *cmd, void *dummy, char *arg)
{
! char *limited_methods = getword(cmd->pool,&arg,'>');
int limited = 0;
if (cmd->limited > 0) return "Can't nest <Limit> sections";
--- 512,520 ----
return NULL;
}
! const char *limit (cmd_parms *cmd, void *dummy, const char *arg)
{
! const char *limited_methods = getword(cmd->pool,&arg,'>');
int limited = 0;
if (cmd->limited > 0) return "Can't nest <Limit> sections";
***************
*** 535,541 ****
return NULL;
}
! char *endlimit (cmd_parms *cmd, void *dummy, void *dummy2)
{
if (cmd->limited == -1) return "</Limit> unexpected";
--- 534,540 ----
return NULL;
}
! const char *endlimit (cmd_parms *cmd, void *dummy, void *dummy2)
{
if (cmd->limited == -1) return "</Limit> unexpected";
***************
*** 543,557 ****
return NULL;
}
! static char *end_dir_magic = "</Directory> outside of any <Directory> section";
! char *end_dirsection (cmd_parms *cmd, void *dummy) {
return end_dir_magic;
}
! char *dirsection (cmd_parms *cmd, void *dummy, char *arg)
{
! char *errmsg, *endp = strrchr (arg, '>');
int old_overrides = cmd->override;
char *old_path = cmd->path;
core_dir_config *conf;
--- 542,557 ----
return NULL;
}
! static const char end_dir_magic[] = "</Directory> outside of any <Directory> section";
! const char *end_dirsection (cmd_parms *cmd, void *dummy) {
return end_dir_magic;
}
! const char *dirsection (cmd_parms *cmd, void *dummy, const char *arg)
{
! const char *errmsg;
! char *endp = strrchr (arg, '>');
int old_overrides = cmd->override;
char *old_path = cmd->path;
core_dir_config *conf;
***************
*** 585,599 ****
return NULL;
}
! static char *end_url_magic = "</Location> outside of any <Location> section";
! char *end_urlsection (cmd_parms *cmd, void *dummy) {
return end_url_magic;
}
! char *urlsection (cmd_parms *cmd, void *dummy, char *arg)
{
! char *errmsg, *endp = strrchr (arg, '>');
int old_overrides = cmd->override;
char *old_path = cmd->path;
core_dir_config *conf;
--- 585,600 ----
return NULL;
}
! static const char end_url_magic[] = "</Location> outside of any <Location> section";
! const char *end_urlsection (cmd_parms *cmd, void *dummy) {
return end_url_magic;
}
! const char *urlsection (cmd_parms *cmd, void *dummy, const char *arg)
{
! const char *errmsg;
! char *endp = strrchr (arg, '>');
int old_overrides = cmd->override;
char *old_path = cmd->path;
core_dir_config *conf;
***************
*** 631,643 ****
static char *end_file_magic = "</Files> outside of any <Files> section";
! char *end_filesection (cmd_parms *cmd, void *dummy) {
return end_file_magic;
}
! char *filesection (cmd_parms *cmd, core_dir_config *c, char *arg)
{
! char *errmsg, *endp = strrchr (arg, '>');
char *old_path = cmd->path;
core_dir_config *conf;
regex_t *r = NULL;
--- 632,645 ----
static char *end_file_magic = "</Files> outside of any <Files> section";
! const char *end_filesection (cmd_parms *cmd, void *dummy) {
return end_file_magic;
}
! const char *filesection (cmd_parms *cmd, core_dir_config *c, const char *arg)
{
! const char *errmsg;
! char *endp = strrchr (arg, '>');
char *old_path = cmd->path;
core_dir_config *conf;
regex_t *r = NULL;
***************
*** 673,683 ****
return NULL;
}
! char *end_ifmod (cmd_parms *cmd, void *dummy) {
return NULL;
}
! char *start_ifmod (cmd_parms *cmd, void *dummy, char *arg)
{
char *endp = strrchr (arg, '>');
char l[MAX_STRING_LEN];
--- 675,685 ----
return NULL;
}
! const char *end_ifmod (cmd_parms *cmd, void *dummy) {
return NULL;
}
! const char *start_ifmod (cmd_parms *cmd, void *dummy, char *arg)
{
char *endp = strrchr (arg, '>');
char l[MAX_STRING_LEN];
***************
*** 707,723 ****
/* httpd.conf commands... beginning with the <VirtualHost> business */
! char *end_virthost_magic = "</Virtualhost> out of place";
! char *end_virtualhost_section (cmd_parms *cmd, void *dummy)
{
return end_virthost_magic;
}
! char *virtualhost_section (cmd_parms *cmd, void *dummy, char *arg)
{
server_rec *main_server = cmd->server, *s;
! char *errmsg, *endp = strrchr (arg, '>');
pool *p = cmd->pool, *ptemp = cmd->temp_pool;
if (endp) *endp = '\0';
--- 709,726 ----
/* httpd.conf commands... beginning with the <VirtualHost> business */
! const char end_virthost_magic[] = "</Virtualhost> out of place";
! const char *end_virtualhost_section (cmd_parms *cmd, void *dummy)
{
return end_virthost_magic;
}
! const char *virtualhost_section (cmd_parms *cmd, void *dummy, char *arg)
{
server_rec *main_server = cmd->server, *s;
! const char *errmsg;
! char *endp = strrchr (arg, '>');
pool *p = cmd->pool, *ptemp = cmd->temp_pool;
if (endp) *endp = '\0';
***************
*** 748,754 ****
return errmsg;
}
! char *set_server_string_slot (cmd_parms *cmd, void *dummy, char *arg)
{
/* This one's pretty generic... */
--- 751,757 ----
return errmsg;
}
! const char *set_server_string_slot (cmd_parms *cmd, void *dummy, char *arg)
{
/* This one's pretty generic... */
***************
*** 759,765 ****
return NULL;
}
! char *server_type (cmd_parms *cmd, void *dummy, char *arg)
{
if (!strcasecmp (arg, "inetd")) standalone = 0;
else if (!strcasecmp (arg, "standalone")) standalone = 1;
--- 762,768 ----
return NULL;
}
! const char *server_type (cmd_parms *cmd, void *dummy, char *arg)
{
if (!strcasecmp (arg, "inetd")) standalone = 0;
else if (!strcasecmp (arg, "standalone")) standalone = 1;
***************
*** 768,779 ****
return NULL;
}
! char *server_port (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->port = atoi (arg);
return NULL;
}
! char *set_user (cmd_parms *cmd, void *dummy, char *arg)
{
uid_t uid;
--- 771,782 ----
return NULL;
}
! const char *server_port (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->port = atoi (arg);
return NULL;
}
! const char *set_user (cmd_parms *cmd, void *dummy, char *arg)
{
uid_t uid;
***************
*** 789,795 ****
return NULL;
}
! char *set_group (cmd_parms *cmd, void *dummy, char *arg)
{
gid_t gid;
--- 792,798 ----
return NULL;
}
! const char *set_group (cmd_parms *cmd, void *dummy, char *arg)
{
gid_t gid;
***************
*** 803,866 ****
return NULL;
}
! char *set_server_root (cmd_parms *cmd, void *dummy, char *arg) {
if (!is_directory (arg)) return "ServerRoot must be a valid directory";
strcpy (server_root, arg);
return NULL;
}
! char *set_timeout (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->timeout = atoi (arg);
return NULL;
}
! char *set_keep_alive_timeout (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->keep_alive_timeout = atoi (arg);
return NULL;
}
! char *set_keep_alive (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->keep_alive = atoi (arg);
return NULL;
}
! char *set_pidfile (cmd_parms *cmd, void *dummy, char *arg) {
pid_fname = pstrdup (cmd->pool, arg);
return NULL;
}
! char *set_scoreboard (cmd_parms *cmd, void *dummy, char *arg) {
scoreboard_fname = pstrdup (cmd->pool, arg);
return NULL;
}
! char *set_idcheck (cmd_parms *cmd, core_dir_config *d, int arg) {
d->do_rfc1413 = arg;
return NULL;
}
! char *set_hostname_lookups (cmd_parms *cmd, core_dir_config *d, int arg) {
d->hostname_lookups = arg;
return NULL;
}
! char *set_serverpath (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->path = pstrdup (cmd->pool, arg);
cmd->server->pathlen = strlen (arg);
return NULL;
}
! char *set_content_md5 (cmd_parms *cmd, core_dir_config *d, int arg) {
d->content_md5 = arg;
return NULL;
}
! char *set_daemons_to_start (cmd_parms *cmd, void *dummy, char *arg) {
daemons_to_start = atoi (arg);
return NULL;
}
! char *set_min_free_servers (cmd_parms *cmd, void *dummy, char *arg) {
daemons_min_free = atoi (arg);
if (daemons_min_free <= 0) {
fprintf(stderr, "WARNING: detected MinSpareServers set to non-positive.\n");
--- 806,870 ----
return NULL;
}
! const char *set_server_root (cmd_parms *cmd, void *dummy, char *arg) {
if (!is_directory (arg)) return "ServerRoot must be a valid directory";
strcpy (server_root, arg);
return NULL;
}
! const char *set_timeout (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->timeout = atoi (arg);
return NULL;
}
! const char *set_keep_alive_timeout (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->keep_alive_timeout = atoi (arg);
return NULL;
}
! const char *set_keep_alive (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->keep_alive = atoi (arg);
return NULL;
}
! const char *set_pidfile (cmd_parms *cmd, void *dummy, char *arg) {
pid_fname = pstrdup (cmd->pool, arg);
return NULL;
}
! const char *set_scoreboard (cmd_parms *cmd, void *dummy, char *arg) {
scoreboard_fname = pstrdup (cmd->pool, arg);
return NULL;
}
! const char *set_idcheck (cmd_parms *cmd, core_dir_config *d, int arg) {
d->do_rfc1413 = arg;
return NULL;
}
! const char *set_hostname_lookups (cmd_parms *cmd, core_dir_config *d, int arg)
! {
d->hostname_lookups = arg;
return NULL;
}
! const char *set_serverpath (cmd_parms *cmd, void *dummy, char *arg) {
cmd->server->path = pstrdup (cmd->pool, arg);
cmd->server->pathlen = strlen (arg);
return NULL;
}
! const char *set_content_md5 (cmd_parms *cmd, core_dir_config *d, int arg) {
d->content_md5 = arg;
return NULL;
}
! const char *set_daemons_to_start (cmd_parms *cmd, void *dummy, char *arg) {
daemons_to_start = atoi (arg);
return NULL;
}
! const char *set_min_free_servers (cmd_parms *cmd, void *dummy, char *arg) {
daemons_min_free = atoi (arg);
if (daemons_min_free <= 0) {
fprintf(stderr, "WARNING: detected MinSpareServers set to non-positive.\n");
***************
*** 872,883 ****
return NULL;
}
! char *set_max_free_servers (cmd_parms *cmd, void *dummy, char *arg) {
daemons_max_free = atoi (arg);
return NULL;
}
! char *set_server_limit (cmd_parms *cmd, void *dummy, char *arg) {
daemons_limit = atoi (arg);
if (daemons_limit > HARD_SERVER_LIMIT) {
fprintf(stderr, "WARNING: Compile-time limit of %d servers\n",
--- 876,887 ----
return NULL;
}
! const char *set_max_free_servers (cmd_parms *cmd, void *dummy, char *arg) {
daemons_max_free = atoi (arg);
return NULL;
}
! const char *set_server_limit (cmd_parms *cmd, void *dummy, char *arg) {
daemons_limit = atoi (arg);
if (daemons_limit > HARD_SERVER_LIMIT) {
fprintf(stderr, "WARNING: Compile-time limit of %d servers\n",
***************
*** 889,901 ****
return NULL;
}
! char *set_max_requests (cmd_parms *cmd, void *dummy, char *arg) {
max_requests_per_child = atoi (arg);
return NULL;
}
#if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC)
! static void set_rlimit(cmd_parms *cmd, struct rlimit **plimit, char *arg,
int type)
{
char *str;
--- 893,905 ----
return NULL;
}
! const char *set_max_requests (cmd_parms *cmd, void *dummy, char *arg) {
max_requests_per_child = atoi (arg);
return NULL;
}
#if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC)
! static void set_rlimit(cmd_parms *cmd, struct rlimit **plimit, const char *arg,
int type)
{
char *str;
***************
*** 942,948 ****
}
#endif
! static char *no_set_limit (cmd_parms *cmd, core_dir_config *conf, char *arg)
{
log_printf(cmd->server, "%s not supported on this platform",
cmd->cmd->name);
--- 946,953 ----
}
#endif
! static const char *no_set_limit (cmd_parms *cmd, core_dir_config *conf,
! char *arg)
{
log_printf(cmd->server, "%s not supported on this platform",
cmd->cmd->name);
***************
*** 950,956 ****
}
#ifdef RLIMIT_CPU
! char *set_limit_cpu (cmd_parms *cmd, core_dir_config *conf, char *arg)
{
set_rlimit(cmd,&conf->limit_cpu,arg,RLIMIT_CPU);
return NULL;
--- 955,961 ----
}
#ifdef RLIMIT_CPU
! const char *set_limit_cpu (cmd_parms *cmd, core_dir_config *conf, char *arg)
{
set_rlimit(cmd,&conf->limit_cpu,arg,RLIMIT_CPU);
return NULL;
***************
*** 958,964 ****
#endif
#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)
! char *set_limit_mem (cmd_parms *cmd, core_dir_config *conf, char *arg)
{
#ifdef RLIMIT_DATA
set_rlimit(cmd,&conf->limit_mem,arg,RLIMIT_DATA);
--- 963,969 ----
#endif
#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)
! const char *set_limit_mem (cmd_parms *cmd, core_dir_config *conf, char *arg)
{
#ifdef RLIMIT_DATA
set_rlimit(cmd,&conf->limit_mem,arg,RLIMIT_DATA);
***************
*** 970,988 ****
#endif
#ifdef RLIMIT_NPROC
! char *set_limit_nproc (cmd_parms *cmd, core_dir_config *conf, char *arg)
{
set_rlimit(cmd,&conf->limit_nproc,arg,RLIMIT_NPROC);
return NULL;
}
#endif
! char *set_bind_address (cmd_parms *cmd, void *dummy, char *arg) {
bind_address.s_addr = get_virthost_addr (arg, NULL);
return NULL;
}
! char *set_listener(cmd_parms *cmd, void *dummy, char *ips)
{
listen_rec *new;
char *ports;
--- 975,993 ----
#endif
#ifdef RLIMIT_NPROC
! const char *set_limit_nproc (cmd_parms *cmd, core_dir_config *conf, char *arg)
{
set_rlimit(cmd,&conf->limit_nproc,arg,RLIMIT_NPROC);
return NULL;
}
#endif
! const char *set_bind_address (cmd_parms *cmd, void *dummy, char *arg) {
bind_address.s_addr = get_virthost_addr (arg, NULL);
return NULL;
}
! const char *set_listener(cmd_parms *cmd, void *dummy, char *ips)
{
listen_rec *new;
char *ports;
1.8 +2 -2 apache/src/http_log.c
Index: http_log.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_log.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C3 -r1.7 -r1.8
*** http_log.c 1996/09/23 14:07:09 1.7
--- http_log.c 1996/10/20 18:03:31 1.8
***************
*** 50,56 ****
*
*/
! /* $Id: http_log.c,v 1.7 1996/09/23 14:07:09 jim Exp $ */
/*
* http_log.c: Dealing with the logs and errors
--- 50,56 ----
*
*/
! /* $Id: http_log.c,v 1.8 1996/10/20 18:03:31 ben Exp $ */
/*
* http_log.c: Dealing with the logs and errors
***************
*** 184,190 ****
fflush(s->error_log);
}
! void log_reason(char *reason, char *file, request_rec *r) {
fprintf (r->server->error_log,
"[%s] access to %s failed for %s, reason: %s\n",
get_time(), file,
--- 184,190 ----
fflush(s->error_log);
}
! void log_reason(const char *reason, const char *file, request_rec *r) {
fprintf (r->server->error_log,
"[%s] access to %s failed for %s, reason: %s\n",
get_time(), file,
1.4 +2 -2 apache/src/http_log.h
Index: http_log.h
===================================================================
RCS file: /export/home/cvs/apache/src/http_log.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C3 -r1.3 -r1.4
*** http_log.h 1996/08/20 11:50:46 1.3
--- http_log.h 1996/10/20 18:03:31 1.4
***************
*** 50,56 ****
*
*/
! /* $Id: http_log.h,v 1.3 1996/08/20 11:50:46 paul Exp $ */
void open_logs (server_rec *, pool *p);
void error_log2stderr (server_rec *);
--- 50,56 ----
*
*/
! /* $Id: http_log.h,v 1.4 1996/10/20 18:03:31 ben Exp $ */
void open_logs (server_rec *, pool *p);
void error_log2stderr (server_rec *);
***************
*** 60,64 ****
extern void log_unixerr(const char *routine, const char *file,
const char *msg, server_rec *s);
void log_printf(const server_rec *s, const char *fmt, ...);
! void log_reason(char *reason, char *fname, request_rec *r);
--- 60,64 ----
extern void log_unixerr(const char *routine, const char *file,
const char *msg, server_rec *s);
void log_printf(const server_rec *s, const char *fmt, ...);
! void log_reason(const char *reason, const char *fname, request_rec *r);
1.60 +14 -12 apache/src/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -C3 -r1.59 -r1.60
*** http_protocol.c 1996/10/20 15:40:05 1.59
--- http_protocol.c 1996/10/20 18:03:31 1.60
***************
*** 240,245 ****
--- 240,246 ----
int each_byterange (request_rec *r, long *offset, long *length) {
long range_start, range_end;
char *range;
+ const char *rp;
if (!*r->range) {
if (r->byterange > 1)
***************
*** 247,253 ****
return 0;
}
! range = getword(r->pool, &r->range, ',');
if (!parse_byterange(range, r->clength, &range_start, &range_end))
return each_byterange(r, offset, length); /* Skip this one */
--- 248,254 ----
return 0;
}
! range = getword_nc(r->pool, &r->range, ',');
if (!parse_byterange(range, r->clength, &range_start, &range_end))
return each_byterange(r, offset, length); /* Skip this one */
***************
*** 396,402 ****
return s;
}
! void parse_uri (request_rec *r, char *uri)
{
const char *s;
--- 397,403 ----
return s;
}
! void parse_uri (request_rec *r, const char *uri)
{
const char *s;
***************
*** 412,423 ****
if (*s == ':' && s != uri)
{
r->proxyreq = 1;
! r->uri = uri;
r->args = NULL;
}
else if (r->method && !strcmp(r->method, "TRACE")) {
r->proxyreq = 0;
! r->uri = uri;
r->args = NULL;
}
else {
--- 413,424 ----
if (*s == ':' && s != uri)
{
r->proxyreq = 1;
! r->uri = pstrdup(r->pool, uri);
r->args = NULL;
}
else if (r->method && !strcmp(r->method, "TRACE")) {
r->proxyreq = 0;
! r->uri = pstrdup(r->pool, uri);
r->args = NULL;
}
else {
***************
*** 434,440 ****
};
#endif
! if (*uri) r->args= uri;
else r->args = NULL;
}
}
--- 435,441 ----
};
#endif
! if (*uri) r->args= pstrdup(r->pool, uri);
else r->args = NULL;
}
}
***************
*** 452,458 ****
name[i] = '\0';
/* Find the port */
! host = getword(r->pool, &name, ':');
if (*name) port = atoi(name);
else port = 80;
--- 453,459 ----
name[i] = '\0';
/* Find the port */
! host = getword_nc(r->pool, &name, ':');
if (*name) port = atoi(name);
else port = 80;
***************
*** 564,571 ****
}
static void check_hostalias (request_rec *r) {
! char *host = getword(r->pool, &r->hostname, ':'); /* Get rid of port */
! int port = (*r->hostname) ? atoi(r->hostname) : 80;
server_rec *s;
int l;
--- 565,573 ----
}
static void check_hostalias (request_rec *r) {
! const char *hostname=r->hostname;
! char *host = getword(r->pool, &hostname, ':'); /* Get rid of port */
! int port = (*hostname) ? atoi(hostname) : 80;
server_rec *s;
int l;
***************
*** 580,586 ****
r->hostname = host;
for (s = r->server->next; s; s = s->next) {
! char *names = s->names;
if ((!strcasecmp(host, s->server_hostname)) && (port == s->port)) {
r->server = r->connection->server = s;
--- 582,588 ----
r->hostname = host;
for (s = r->server->next; s; s = s->next) {
! const char *names = s->names;
if ((!strcasecmp(host, s->server_hostname)) && (port == s->port)) {
r->server = r->connection->server = s;
***************
*** 700,706 ****
* *someone* has to set the protocol-specific fields...
*/
! void set_sub_req_protocol (request_rec *rnew, request_rec *r)
{
rnew->assbackwards = 1; /* Don't send headers from this. */
rnew->no_local_copy = 1; /* Don't try to send USE_LOCAL_COPY for a
--- 702,708 ----
* *someone* has to set the protocol-specific fields...
*/
! void set_sub_req_protocol (request_rec *rnew, const request_rec *r)
{
rnew->assbackwards = 1; /* Don't send headers from this. */
rnew->no_local_copy = 1; /* Don't try to send USE_LOCAL_COPY for a
***************
*** 717,723 ****
rnew->err_headers_out = make_table (rnew->pool, 5);
rnew->notes = make_table (rnew->pool, 5);
! rnew->main = r;
}
void finalize_sub_req_protocol (request_rec *sub)
--- 719,725 ----
rnew->err_headers_out = make_table (rnew->pool, 5);
rnew->notes = make_table (rnew->pool, 5);
! rnew->main = (request_rec *)r;
}
void finalize_sub_req_protocol (request_rec *sub)
***************
*** 757,763 ****
int get_basic_auth_pw (request_rec *r, char **pw)
{
! char *auth_line = table_get (r->headers_in, "Authorization");
char *t;
if(!(t = auth_type(r)) || strcasecmp(t, "Basic"))
--- 759,765 ----
int get_basic_auth_pw (request_rec *r, char **pw)
{
! const char *auth_line = table_get (r->headers_in, "Authorization");
char *t;
if(!(t = auth_type(r)) || strcasecmp(t, "Basic"))
1.12 +2 -2 apache/src/http_protocol.h
Index: http_protocol.h
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C3 -r1.11 -r1.12
*** http_protocol.h 1996/10/20 15:40:05 1.11
--- http_protocol.h 1996/10/20 18:03:32 1.12
***************
*** 175,183 ****
* Also, a wrapup function to keep the internal accounting straight.
*/
! void set_sub_req_protocol (request_rec *rnew, request_rec *r);
void finalize_sub_req_protocol (request_rec *sub_r);
/* This is also useful for putting sub_reqs and internal_redirects together */
! void parse_uri (request_rec *r, char *uri);
--- 175,183 ----
* Also, a wrapup function to keep the internal accounting straight.
*/
! void set_sub_req_protocol (request_rec *rnew, const request_rec *r);
void finalize_sub_req_protocol (request_rec *sub_r);
/* This is also useful for putting sub_reqs and internal_redirects together */
! void parse_uri (request_rec *r, const char *uri);
1.23 +3 -3 apache/src/http_request.c
Index: http_request.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_request.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C3 -r1.22 -r1.23
*** http_request.c 1996/10/19 15:17:06 1.22
--- http_request.c 1996/10/20 18:03:32 1.23
***************
*** 50,56 ****
*
*/
! /* $Id: http_request.c,v 1.22 1996/10/19 15:17:06 ben Exp $ */
/*
* http_request.c: functions to get and process requests
--- 50,56 ----
*
*/
! /* $Id: http_request.c,v 1.23 1996/10/20 18:03:32 ben Exp $ */
/*
* http_request.c: functions to get and process requests
***************
*** 507,513 ****
* structure...
*/
! request_rec *make_sub_request (request_rec *r)
{
pool *rrp = make_sub_pool (r->pool);
request_rec *rr = pcalloc (rrp, sizeof (request_rec));
--- 507,513 ----
* structure...
*/
! request_rec *make_sub_request (const request_rec *r)
{
pool *rrp = make_sub_pool (r->pool);
request_rec *rr = pcalloc (rrp, sizeof (request_rec));
***************
*** 556,562 ****
static int some_auth_required (request_rec *r);
! request_rec *sub_req_lookup_uri (char *new_file, request_rec *r)
{
request_rec *rnew;
int res;
--- 556,562 ----
static int some_auth_required (request_rec *r);
! request_rec *sub_req_lookup_uri (const char *new_file, const request_rec *r)
{
request_rec *rnew;
int res;
1.5 +2 -2 apache/src/http_request.h
Index: http_request.h
===================================================================
RCS file: /export/home/cvs/apache/src/http_request.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C3 -r1.4 -r1.5
*** http_request.h 1996/08/20 11:50:52 1.4
--- http_request.h 1996/10/20 18:03:32 1.5
***************
*** 50,56 ****
*
*/
! /* $Id: http_request.h,v 1.4 1996/08/20 11:50:52 paul Exp $ */
/* http_request.c is the code which handles the main line of request
* processing, once a request has been read in (finding the right per-
--- 50,56 ----
*
*/
! /* $Id: http_request.h,v 1.5 1996/10/20 18:03:32 ben Exp $ */
/* http_request.c is the code which handles the main line of request
* processing, once a request has been read in (finding the right per-
***************
*** 72,78 ****
* about which was allocated in its pool elsewhere before doing this.
*/
! request_rec *sub_req_lookup_uri (char *new_file, request_rec *r);
request_rec *sub_req_lookup_file (char *new_file, request_rec *r);
int run_sub_req (request_rec *r);
void destroy_sub_req (request_rec *r);
--- 72,78 ----
* about which was allocated in its pool elsewhere before doing this.
*/
! request_rec *sub_req_lookup_uri (const char *new_file, const request_rec *r);
request_rec *sub_req_lookup_file (char *new_file, request_rec *r);
int run_sub_req (request_rec *r);
void destroy_sub_req (request_rec *r);
1.56 +7 -5 apache/src/httpd.h
Index: httpd.h
===================================================================
RCS file: /export/home/cvs/apache/src/httpd.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -C3 -r1.55 -r1.56
*** httpd.h 1996/10/16 23:24:32 1.55
--- httpd.h 1996/10/20 18:03:32 1.56
***************
*** 50,57 ****
*
*/
- /* $Id: httpd.h,v 1.55 1996/10/16 23:24:32 fielding Exp $ */
-
/*
* httpd.h: header for simple (ha! not anymore) http daemon
*/
--- 50,55 ----
***************
*** 601,612 ****
char *ht_time (pool *p, time_t t, const char *fmt, int gmt);
char *gm_timestr_822(pool *p, time_t t);
! /* String handling */
! char *getword(pool *p, char **line, char stop);
char *getword_white(pool *p, char **line);
char *getword_nulls (pool *p, char **line, char stop);
! char *getword_conf (pool *p, char **line);
char *get_token (pool *p, char **accept_line, int accept_white);
int find_token (pool *p, const char *line, const char *tok);
--- 599,614 ----
char *ht_time (pool *p, time_t t, const char *fmt, int gmt);
char *gm_timestr_822(pool *p, time_t t);
! /* String handling. The *_nc variants allow you to use non-const char **s as
! arguments (unfortunately C won't automatically convert a char ** to a const
! char **) */
! char *getword(pool *p, const char **line, char stop);
! char *getword_nc(pool *p, char **line, char stop);
char *getword_white(pool *p, char **line);
char *getword_nulls (pool *p, char **line, char stop);
! char *getword_conf (pool *p, const char **line);
! char *getword_conf_nc (pool *p, char **line);
char *get_token (pool *p, char **accept_line, int accept_white);
int find_token (pool *p, const char *line, const char *tok);
1.7 +2 -4 apache/src/mod_access.c
Index: mod_access.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_access.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C3 -r1.6 -r1.7
*** mod_access.c 1996/10/08 20:34:07 1.6
--- mod_access.c 1996/10/20 18:03:33 1.7
***************
*** 50,57 ****
*
*/
- /* $Id: mod_access.c,v 1.6 1996/10/08 20:34:07 brian Exp $ */
-
/*
* Security options etc.
*
--- 50,55 ----
***************
*** 95,101 ****
return (void *)conf;
}
! char *order (cmd_parms *cmd, void *dv, char *arg)
{
access_dir_conf *d = (access_dir_conf *)dv;
int i, order;
--- 93,99 ----
return (void *)conf;
}
! const char *order (cmd_parms *cmd, void *dv, char *arg)
{
access_dir_conf *d = (access_dir_conf *)dv;
int i, order;
***************
*** 112,118 ****
return NULL;
}
! char *allow_cmd (cmd_parms *cmd, void *dv, char *from, char *where)
{
access_dir_conf *d = (access_dir_conf *)dv;
allowdeny *a;
--- 110,116 ----
return NULL;
}
! const char *allow_cmd (cmd_parms *cmd, void *dv, char *from, char *where)
{
access_dir_conf *d = (access_dir_conf *)dv;
allowdeny *a;
1.7 +4 -5 apache/src/mod_actions.c
Index: mod_actions.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_actions.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C3 -r1.6 -r1.7
*** mod_actions.c 1996/08/20 11:50:55 1.6
--- mod_actions.c 1996/10/20 18:03:33 1.7
***************
*** 50,57 ****
*
*/
- /* $Id: mod_actions.c,v 1.6 1996/08/20 11:50:55 paul Exp $ */
-
/*
* mod_actions.c: executes scripts based on MIME type
*
--- 50,55 ----
***************
*** 119,132 ****
return new;
}
! char *add_action(cmd_parms *cmd, action_dir_config *m, char *type, char *script)
{
table_set (m->action_types, type, script);
return NULL;
}
! char *set_script (cmd_parms *cmd, action_dir_config *m, char *method,
! char *script)
{
if (!strcmp(method, "GET"))
m->get = pstrdup(cmd->pool, script);
--- 117,131 ----
return new;
}
! const char *add_action(cmd_parms *cmd, action_dir_config *m, char *type,
! char *script)
{
table_set (m->action_types, type, script);
return NULL;
}
! const char *set_script (cmd_parms *cmd, action_dir_config *m, char *method,
! char *script)
{
if (!strcmp(method, "GET"))
m->get = pstrdup(cmd->pool, script);
1.8 +5 -3 apache/src/mod_alias.c
Index: mod_alias.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_alias.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C3 -r1.7 -r1.8
*** mod_alias.c 1996/08/20 11:50:56 1.7
--- mod_alias.c 1996/10/20 18:03:33 1.8
***************
*** 50,56 ****
*
*/
! /* $Id: mod_alias.c,v 1.7 1996/08/20 11:50:56 paul Exp $ */
/*
* http_alias.c: Stuff for dealing with directory aliases
--- 50,56 ----
*
*/
! /* $Id: mod_alias.c,v 1.8 1996/10/20 18:03:33 ben Exp $ */
/*
* http_alias.c: Stuff for dealing with directory aliases
***************
*** 117,123 ****
a->redirects = append_arrays (p, overrides->redirects, base->redirects);
return a;
}
! char *add_alias(cmd_parms *cmd, void *dummy, char *f, char *r)
{
server_rec *s = cmd->server;
alias_server_conf *conf =
--- 117,124 ----
a->redirects = append_arrays (p, overrides->redirects, base->redirects);
return a;
}
!
! const char *add_alias(cmd_parms *cmd, void *dummy, char *f, char *r)
{
server_rec *s = cmd->server;
alias_server_conf *conf =
***************
*** 130,136 ****
return NULL;
}
! char *add_redirect(cmd_parms *cmd, alias_dir_conf *dirconf, char *f, char *url)
{
alias_entry *new;
server_rec *s = cmd->server;
--- 131,138 ----
return NULL;
}
! const char *add_redirect(cmd_parms *cmd, alias_dir_conf *dirconf, char *f,
! char *url)
{
alias_entry *new;
server_rec *s = cmd->server;
1.7 +4 -6 apache/src/mod_auth.c
Index: mod_auth.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_auth.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C3 -r1.6 -r1.7
*** mod_auth.c 1996/10/08 22:19:22 1.6
--- mod_auth.c 1996/10/20 18:03:34 1.7
***************
*** 50,57 ****
*
*/
- /* $Id: mod_auth.c,v 1.6 1996/10/08 22:19:22 brian Exp $ */
-
/*
* http_auth: authentication
*
--- 50,55 ----
***************
*** 79,85 ****
return pcalloc (p, sizeof(auth_config_rec));
}
! char *set_auth_slot (cmd_parms *cmd, void *offset, char *f, char *t)
{
if (t && strcmp(t, "standard"))
return pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL);
--- 77,83 ----
return pcalloc (p, sizeof(auth_config_rec));
}
! const char *set_auth_slot (cmd_parms *cmd, void *offset, char *f, char *t)
{
if (t && strcmp(t, "standard"))
return pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL);
***************
*** 101,107 ****
{
FILE *f;
char l[MAX_STRING_LEN];
! char *rpw, *w;
if(!(f=pfopen(r->pool, auth_pwfile, "r"))) {
log_reason ("Could not open password file", auth_pwfile, r);
--- 99,105 ----
{
FILE *f;
char l[MAX_STRING_LEN];
! const char *rpw, *w;
if(!(f=pfopen(r->pool, auth_pwfile, "r"))) {
log_reason ("Could not open password file", auth_pwfile, r);
***************
*** 126,132 ****
table *grps = make_table (p, 15);
pool *sp;
char l[MAX_STRING_LEN];
! char *group_name, *ll, *w;
if(!(f=pfopen(p, grpfile, "r")))
return NULL;
--- 124,130 ----
table *grps = make_table (p, 15);
pool *sp;
char l[MAX_STRING_LEN];
! const char *group_name, *ll, *w;
if(!(f=pfopen(p, grpfile, "r")))
return NULL;
***************
*** 206,212 ****
int m = r->method_number;
int method_restricted = 0;
register int x;
! char *t, *w;
table *grpstatus;
array_header *reqs_arr = requires (r);
require_line *reqs;
--- 204,210 ----
int m = r->method_number;
int method_restricted = 0;
register int x;
! const char *t, *w;
table *grpstatus;
array_header *reqs_arr = requires (r);
require_line *reqs;
1.5 +2 -3 apache/src/mod_browser.c
Index: mod_browser.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_browser.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C3 -r1.4 -r1.5
*** mod_browser.c 1996/10/05 13:26:51 1.4
--- mod_browser.c 1996/10/20 18:03:34 1.5
***************
*** 50,57 ****
*
*/
- /* $Id: mod_browser.c,v 1.4 1996/10/05 13:26:51 ben Exp $ */
-
/*
* mod_browser.c
* Set environment variables based on browser support.
--- 50,55 ----
***************
*** 93,99 ****
return a;
}
! char *add_browser(cmd_parms *cmd, void *dummy, char *name, char *feature)
{
browser_server_config_rec *sconf =
get_module_config (cmd->server->module_config, &browser_module);
--- 91,98 ----
return a;
}
! const char *add_browser(cmd_parms *cmd, void *dummy, char *name,
! const char *feature)
{
browser_server_config_rec *sconf =
get_module_config (cmd->server->module_config, &browser_module);
1.20 +3 -5 apache/src/mod_cgi.c
Index: mod_cgi.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_cgi.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C3 -r1.19 -r1.20
*** mod_cgi.c 1996/10/08 21:47:00 1.19
--- mod_cgi.c 1996/10/20 18:03:34 1.20
***************
*** 50,57 ****
*
*/
- /* $Id: mod_cgi.c,v 1.19 1996/10/08 21:47:00 brian Exp $ */
-
/*
* http_script: keeps all script-related ramblings together.
*
--- 50,55 ----
***************
*** 119,125 ****
return overrides->logname ? overrides : base;
}
! char *set_scriptlog (cmd_parms *cmd, void *dummy, char *arg) {
server_rec *s = cmd->server;
cgi_server_conf *conf =
(cgi_server_conf *)get_module_config(s->module_config, &cgi_module);
--- 117,123 ----
return overrides->logname ? overrides : base;
}
! const char *set_scriptlog (cmd_parms *cmd, void *dummy, char *arg) {
server_rec *s = cmd->server;
cgi_server_conf *conf =
(cgi_server_conf *)get_module_config(s->module_config, &cgi_module);
***************
*** 128,134 ****
return NULL;
}
! char *set_scriptlog_length (cmd_parms *cmd, void *dummy, char *arg) {
server_rec *s = cmd->server;
cgi_server_conf *conf =
(cgi_server_conf *)get_module_config(s->module_config, &cgi_module);
--- 126,132 ----
return NULL;
}
! const char *set_scriptlog_length (cmd_parms *cmd, void *dummy, char *arg) {
server_rec *s = cmd->server;
cgi_server_conf *conf =
(cgi_server_conf *)get_module_config(s->module_config, &cgi_module);
***************
*** 137,143 ****
return NULL;
}
! char *set_scriptlog_buffer (cmd_parms *cmd, void *dummy, char *arg) {
server_rec *s = cmd->server;
cgi_server_conf *conf =
(cgi_server_conf *)get_module_config(s->module_config, &cgi_module);
--- 135,141 ----
return NULL;
}
! const char *set_scriptlog_buffer (cmd_parms *cmd, void *dummy, char *arg) {
server_rec *s = cmd->server;
cgi_server_conf *conf =
(cgi_server_conf *)get_module_config(s->module_config, &cgi_module);
1.14 +11 -13 apache/src/mod_dir.c
Index: mod_dir.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_dir.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C3 -r1.13 -r1.14
*** mod_dir.c 1996/10/08 22:34:29 1.13
--- mod_dir.c 1996/10/20 18:03:34 1.14
***************
*** 50,57 ****
*
*/
- /* $Id: mod_dir.c,v 1.13 1996/10/08 22:34:29 brian Exp $ */
-
/*
* http_dir.c: Handles the on-the-fly html index generation
*
--- 50,55 ----
***************
*** 126,132 ****
p->apply_to = NULL;
}
! char *add_alt(cmd_parms *cmd, void *d, char *alt, char *to)
{
if (cmd->info == BY_PATH)
if(!strcmp(to,"**DIRECTORY**"))
--- 124,130 ----
p->apply_to = NULL;
}
! const char *add_alt(cmd_parms *cmd, void *d, char *alt, char *to)
{
if (cmd->info == BY_PATH)
if(!strcmp(to,"**DIRECTORY**"))
***************
*** 136,147 ****
return NULL;
}
! char *add_icon(cmd_parms *cmd, void *d, char *icon, char *to)
{
char *iconbak = pstrdup (cmd->pool, icon);
if(icon[0] == '(') {
! char *alt = getword (cmd->pool, &iconbak, ',');
iconbak[strlen(iconbak) - 1] = '\0'; /* Lose closing paren */
add_alt(cmd, d, &alt[1], to);
}
--- 134,145 ----
return NULL;
}
! const char *add_icon(cmd_parms *cmd, void *d, char *icon, char *to)
{
char *iconbak = pstrdup (cmd->pool, icon);
if(icon[0] == '(') {
! char *alt = getword_nc (cmd->pool, &iconbak, ',');
iconbak[strlen(iconbak) - 1] = '\0'; /* Lose closing paren */
add_alt(cmd, d, &alt[1], to);
}
***************
*** 154,193 ****
return NULL;
}
! char *add_desc(cmd_parms *cmd, void *d, char *desc, char *to)
{
push_item(((dir_config_rec *)d)->desc_list, cmd->info, to, cmd->path,desc);
return NULL;
}
! char *add_ignore(cmd_parms *cmd, void *d, char *ext) {
push_item(((dir_config_rec *)d)->ign_list, 0, ext, cmd->path, NULL);
return NULL;
}
! char *add_header(cmd_parms *cmd, void *d, char *name) {
push_item(((dir_config_rec *)d)->hdr_list, 0, NULL, cmd->path, name);
return NULL;
}
! char *add_readme(cmd_parms *cmd, void *d, char *name) {
push_item(((dir_config_rec *)d)->rdme_list, 0, NULL, cmd->path, name);
return NULL;
}
! char *add_opts_int(cmd_parms *cmd, void *d, int opts) {
push_item(((dir_config_rec *)d)->opts_list, (char*)opts, NULL,
cmd->path, NULL);
return NULL;
}
! char *fancy_indexing (cmd_parms *cmd, void *d, int arg)
{
return add_opts_int (cmd, d, arg? FANCY_INDEXING : 0);
}
! char *add_opts(cmd_parms *cmd, void *d, char *optstr) {
char *w;
int opts = 0;
--- 152,191 ----
return NULL;
}
! const char *add_desc(cmd_parms *cmd, void *d, char *desc, char *to)
{
push_item(((dir_config_rec *)d)->desc_list, cmd->info, to, cmd->path,desc);
return NULL;
}
! const char *add_ignore(cmd_parms *cmd, void *d, char *ext) {
push_item(((dir_config_rec *)d)->ign_list, 0, ext, cmd->path, NULL);
return NULL;
}
! const char *add_header(cmd_parms *cmd, void *d, char *name) {
push_item(((dir_config_rec *)d)->hdr_list, 0, NULL, cmd->path, name);
return NULL;
}
! const char *add_readme(cmd_parms *cmd, void *d, char *name) {
push_item(((dir_config_rec *)d)->rdme_list, 0, NULL, cmd->path, name);
return NULL;
}
! const char *add_opts_int(cmd_parms *cmd, void *d, int opts) {
push_item(((dir_config_rec *)d)->opts_list, (char*)opts, NULL,
cmd->path, NULL);
return NULL;
}
! const char *fancy_indexing (cmd_parms *cmd, void *d, int arg)
{
return add_opts_int (cmd, d, arg? FANCY_INDEXING : 0);
}
! const char *add_opts(cmd_parms *cmd, void *d, const char *optstr) {
char *w;
int opts = 0;
***************
*** 768,774 ****
{
dir_config_rec *d =
(dir_config_rec *)get_module_config (r->per_dir_config, &dir_module);
! char *names_ptr = d->index_names ? d->index_names : DEFAULT_INDEX;
int allow_opts = allow_options (r);
if (r->uri[0] == '\0' || r->uri[strlen(r->uri)-1] != '/') {
--- 766,772 ----
{
dir_config_rec *d =
(dir_config_rec *)get_module_config (r->per_dir_config, &dir_module);
! const char *names_ptr = d->index_names ? d->index_names : DEFAULT_INDEX;
int allow_opts = allow_options (r);
if (r->uri[0] == '\0' || r->uri[strlen(r->uri)-1] != '/') {
1.6 +7 -6 apache/src/mod_env.c
Index: mod_env.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_env.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C3 -r1.5 -r1.6
*** mod_env.c 1996/10/18 21:12:52 1.5
--- mod_env.c 1996/10/20 18:03:35 1.6
***************
*** 50,57 ****
*
*/
- /* $Id: mod_env.c,v 1.5 1996/10/18 21:12:52 ben Exp $ */
-
/*
* mod_env.c
* version 0.0.5
--- 50,55 ----
***************
*** 127,133 ****
table_entry *elts;
int i;
! char *uenv, *unset;
/*
* new_table = copy_table( p, base->vars );
--- 125,131 ----
table_entry *elts;
int i;
! const char *uenv, *unset;
/*
* new_table = copy_table( p, base->vars );
***************
*** 161,167 ****
return new;
}
! char *add_env_module_vars_passed (cmd_parms *cmd, char *struct_ptr, char *arg)
{
env_server_config_rec *sconf =
get_module_config (cmd->server->module_config, &env_module);
--- 159,166 ----
return new;
}
! const char *add_env_module_vars_passed (cmd_parms *cmd, char *struct_ptr,
! const char *arg)
{
env_server_config_rec *sconf =
get_module_config (cmd->server->module_config, &env_module);
***************
*** 180,186 ****
return NULL;
}
! char *add_env_module_vars_set (cmd_parms *cmd, char *struct_ptr, char *arg)
{
env_server_config_rec *sconf =
get_module_config (cmd->server->module_config, &env_module);
--- 179,186 ----
return NULL;
}
! const char *add_env_module_vars_set (cmd_parms *cmd, char *struct_ptr,
! const char *arg)
{
env_server_config_rec *sconf =
get_module_config (cmd->server->module_config, &env_module);
***************
*** 205,211 ****
return NULL;
}
! char *add_env_module_vars_unset (cmd_parms *cmd, char *struct_ptr, char *arg)
{
env_server_config_rec *sconf =
get_module_config (cmd->server->module_config, &env_module);
--- 205,212 ----
return NULL;
}
! const char *add_env_module_vars_unset (cmd_parms *cmd, char *struct_ptr,
! char *arg)
{
env_server_config_rec *sconf =
get_module_config (cmd->server->module_config, &env_module);
1.15 +1 -3 apache/src/mod_include.c
Index: mod_include.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_include.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C3 -r1.14 -r1.15
*** mod_include.c 1996/08/20 11:51:12 1.14
--- mod_include.c 1996/10/20 18:03:35 1.15
***************
*** 50,57 ****
*
*/
- /* $Id: mod_include.c,v 1.14 1996/08/20 11:51:12 paul Exp $ */
-
/*
* http_include.c: Handles the server-parsed HTML documents
*
--- 50,55 ----
***************
*** 1644,1650 ****
return result;
}
! char *set_xbithack (cmd_parms *cmd, void *xbp, char *arg)
{
enum xbithack *state = (enum xbithack *)xbp;
--- 1642,1648 ----
return result;
}
! const char *set_xbithack (cmd_parms *cmd, void *xbp, char *arg)
{
enum xbithack *state = (enum xbithack *)xbp;
1.14 +13 -15 apache/src/mod_log_config.c
Index: mod_log_config.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_log_config.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C3 -r1.13 -r1.14
*** mod_log_config.c 1996/09/26 12:04:00 1.13
--- mod_log_config.c 1996/10/20 18:03:35 1.14
***************
*** 50,57 ****
*
*/
- /* $Id: mod_log_config.c,v 1.13 1996/09/26 12:04:00 mjc Exp $ */
-
/*
* This is module implements the TransferLog directive (same as the
* common log module), and additional directives, LogFormat and CustomLog.
--- 50,55 ----
***************
*** 374,380 ****
return NULL;
}
! char *log_format_substring (pool *p, char *start, char *end)
{
char *res = palloc (p, end - start + 1);
strncpy (res, start, end - start);
--- 372,378 ----
return NULL;
}
! char *log_format_substring (pool *p, const char *start, const char *end)
{
char *res = palloc (p, end - start + 1);
strncpy (res, start, end - start);
***************
*** 382,390 ****
return res;
}
! char *parse_log_misc_string (pool *p, log_format_item *it, char **sa)
{
! char *s = *sa;
it->func = constant_item;
it->conditions = NULL;
--- 380,388 ----
return res;
}
! char *parse_log_misc_string (pool *p, log_format_item *it, const char **sa)
{
! const char *s = *sa;
it->func = constant_item;
it->conditions = NULL;
***************
*** 396,404 ****
return NULL;
}
! char *parse_log_item (pool *p, log_format_item *it, char **sa)
{
! char *s = *sa;
if (*s != '%') return parse_log_misc_string (p, it, sa);
++s;
--- 394,402 ----
return NULL;
}
! char *parse_log_item (pool *p, log_format_item *it, const char **sa)
{
! const char *s = *sa;
if (*s != '%') return parse_log_misc_string (p, it, sa);
++s;
***************
*** 463,469 ****
return "Ran off end of LogFormat parsing args to some directive";
}
! array_header *parse_log_string (pool *p, char *s, char **err)
{
array_header *a = make_array (p, 30, sizeof (log_format_item));
char *res;
--- 461,467 ----
return "Ran off end of LogFormat parsing args to some directive";
}
! array_header *parse_log_string (pool *p, const char *s, const char **err)
{
array_header *a = make_array (p, 30, sizeof (log_format_item));
char *res;
***************
*** 616,624 ****
return add;
}
! char *log_format (cmd_parms *cmd, void *dummy, char *arg)
{
! char *err_string = NULL;
multi_log_state *mls = get_module_config (cmd->server->module_config,
&config_log_module);
--- 614,622 ----
return add;
}
! const char *log_format (cmd_parms *cmd, void *dummy, char *arg)
{
! const char *err_string = NULL;
multi_log_state *mls = get_module_config (cmd->server->module_config,
&config_log_module);
***************
*** 626,634 ****
return err_string;
}
! char *add_custom_log(cmd_parms *cmd, void *dummy, char *fn, char *fmt)
{
! char *err_string = NULL;
multi_log_state *mls = get_module_config (cmd->server->module_config,
&config_log_module);
config_log_state *cls;
--- 624,632 ----
return err_string;
}
! const char *add_custom_log(cmd_parms *cmd, void *dummy, char *fn, char *fmt)
{
! const char *err_string = NULL;
multi_log_state *mls = get_module_config (cmd->server->module_config,
&config_log_module);
config_log_state *cls;
***************
*** 644,655 ****
return err_string;
}
! char *set_transfer_log(cmd_parms *cmd, void *dummy, char *fn)
{
return add_custom_log(cmd, dummy, fn, NULL);
}
! char *set_cookie_log(cmd_parms *cmd, void *dummy, char *fn)
{
return add_custom_log(cmd, dummy, fn, "%{Cookie}n \"%r\" %t");
}
--- 642,653 ----
return err_string;
}
! const char *set_transfer_log(cmd_parms *cmd, void *dummy, char *fn)
{
return add_custom_log(cmd, dummy, fn, NULL);
}
! const char *set_cookie_log(cmd_parms *cmd, void *dummy, char *fn)
{
return add_custom_log(cmd, dummy, fn, "%{Cookie}n \"%r\" %t");
}
***************
*** 717,723 ****
multi_log_state *mls = get_module_config(s->module_config,
&config_log_module);
config_log_state *clsarray;
! char *dummy;
if (!mls->default_format)
mls->default_format = parse_log_string (p, DEFAULT_LOG_FORMAT, &dummy);
--- 715,721 ----
multi_log_state *mls = get_module_config(s->module_config,
&config_log_module);
config_log_state *clsarray;
! const char *dummy;
if (!mls->default_format)
mls->default_format = parse_log_string (p, DEFAULT_LOG_FORMAT, &dummy);
1.12 +10 -9 apache/src/mod_mime.c
Index: mod_mime.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_mime.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C3 -r1.11 -r1.12
*** mod_mime.c 1996/08/20 11:51:16 1.11
--- mod_mime.c 1996/10/20 18:03:36 1.12
***************
*** 50,57 ****
*
*/
- /* $Id: mod_mime.c,v 1.11 1996/08/20 11:51:16 paul Exp $ */
-
/*
* http_mime.c: Sends/gets MIME headers for requests
*
--- 50,55 ----
***************
*** 114,141 ****
return new;
}
! char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext)
{
if (*ext == '.') ++ext;
table_set (m->forced_types, ext, ct);
return NULL;
}
! char *add_encoding(cmd_parms *cmd, mime_dir_config *m, char *enc, char *ext)
{
if (*ext == '.') ++ext;
table_set (m->encoding_types, ext, enc);
return NULL;
}
! char *add_language(cmd_parms *cmd, mime_dir_config *m, char *lang, char *ext)
{
if (*ext == '.') ++ext;
table_set (m->language_types, ext, lang);
return NULL;
}
! char *add_handler(cmd_parms *cmd, mime_dir_config *m, char *hdlr, char *ext)
{
if (*ext == '.') ++ext;
table_set (m->handlers, ext, hdlr);
--- 112,142 ----
return new;
}
! const char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext)
{
if (*ext == '.') ++ext;
table_set (m->forced_types, ext, ct);
return NULL;
}
! const char *add_encoding(cmd_parms *cmd, mime_dir_config *m, char *enc,
! char *ext)
{
if (*ext == '.') ++ext;
table_set (m->encoding_types, ext, enc);
return NULL;
}
! const char *add_language(cmd_parms *cmd, mime_dir_config *m, char *lang,
! char *ext)
{
if (*ext == '.') ++ext;
table_set (m->language_types, ext, lang);
return NULL;
}
! const char *add_handler(cmd_parms *cmd, mime_dir_config *m, char *hdlr,
! char *ext)
{
if (*ext == '.') ++ext;
table_set (m->handlers, ext, hdlr);
***************
*** 146,152 ****
* the name of its config file, so...
*/
! char *set_types_config (cmd_parms *cmd, void *dummy, char *arg)
{
set_module_config (cmd->server->module_config, &mime_module,
pstrdup (cmd->pool, arg));
--- 147,153 ----
* the name of its config file, so...
*/
! const char *set_types_config (cmd_parms *cmd, void *dummy, char *arg)
{
set_module_config (cmd->server->module_config, &mime_module,
pstrdup (cmd->pool, arg));
***************
*** 202,208 ****
hash_buckets[x] = make_table (p, 10);
while(!(cfg_getline(l,MAX_STRING_LEN,f))) {
! char *ll = l, *ct;
if(l[0] == '#') continue;
ct = getword_conf (p, &ll);
--- 203,209 ----
hash_buckets[x] = make_table (p, 10);
while(!(cfg_getline(l,MAX_STRING_LEN,f))) {
! const char *ll = l, *ct;
if(l[0] == '#') continue;
ct = getword_conf (p, &ll);
***************
*** 218,224 ****
int find_ct(request_rec *r)
{
! char *fn = strrchr(r->filename, '/');
mime_dir_config *conf =
(mime_dir_config *)get_module_config(r->per_dir_config, &mime_module);
char *ext, *type, *orighandler = r->handler;
--- 219,225 ----
int find_ct(request_rec *r)
{
! const char *fn = strrchr(r->filename, '/');
mime_dir_config *conf =
(mime_dir_config *)get_module_config(r->per_dir_config, &mime_module);
char *ext, *type, *orighandler = r->handler;
1.20 +2 -4 apache/src/mod_negotiation.c
Index: mod_negotiation.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_negotiation.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C3 -r1.19 -r1.20
*** mod_negotiation.c 1996/09/28 02:30:56 1.19
--- mod_negotiation.c 1996/10/20 18:03:36 1.20
***************
*** 50,57 ****
*
*/
- /* $Id: mod_negotiation.c,v 1.19 1996/09/28 02:30:56 brian Exp $ */
-
/*
* mod_negotiation.c: keeps track of MIME types the client is willing to
* accept, and contains code to handle type arbitration.
--- 50,55 ----
***************
*** 106,112 ****
return new;
}
! char *set_language_priority (cmd_parms *cmd, void *n, char *lang)
{
array_header *arr = ((neg_dir_config *) n)->language_priority;
char **langp = (char **) push_array (arr);
--- 104,110 ----
return new;
}
! const char *set_language_priority (cmd_parms *cmd, void *n, char *lang)
{
array_header *arr = ((neg_dir_config *) n)->language_priority;
char **langp = (char **) push_array (arr);
***************
*** 115,121 ****
return NULL;
}
! char *cache_negotiated_docs (cmd_parms *cmd, void *dummy, char *dummy2)
{
void *server_conf = cmd->server->module_config;
--- 113,119 ----
return NULL;
}
! const char *cache_negotiated_docs (cmd_parms *cmd, void *dummy, char *dummy2)
{
void *server_conf = cmd->server->module_config;
1.9 +5 -6 apache/src/mod_userdir.c
Index: mod_userdir.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_userdir.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C3 -r1.8 -r1.9
*** mod_userdir.c 1996/08/20 11:51:20 1.8
--- mod_userdir.c 1996/10/20 18:03:36 1.9
***************
*** 50,57 ****
*
*/
- /* $Id: mod_userdir.c,v 1.8 1996/08/20 11:51:20 paul Exp $ */
-
/*
* mod_userdir... implement the UserDir command. Broken away from the
* Alias stuff for a couple of good and not-so-good reasons:
--- 50,55 ----
***************
*** 94,100 ****
return (void*)DEFAULT_USER_DIR;
}
! char *set_user_dir (cmd_parms *cmd, void *dummy, char *arg)
{
void *server_conf = cmd->server->module_config;
--- 92,98 ----
return (void*)DEFAULT_USER_DIR;
}
! const char *set_user_dir (cmd_parms *cmd, void *dummy, char *arg)
{
void *server_conf = cmd->server->module_config;
***************
*** 111,119 ****
int translate_userdir (request_rec *r)
{
void *server_conf = r->server->module_config;
! char *userdirs = (char *)get_module_config(server_conf, &userdir_module);
char *name = r->uri;
! char *w, *dname, *redirect;
char *x = NULL;
if (userdirs == NULL || !strcasecmp(userdirs, "disabled") ||
--- 109,118 ----
int translate_userdir (request_rec *r)
{
void *server_conf = r->server->module_config;
! const char *userdirs = (char *)get_module_config(server_conf,
! &userdir_module);
char *name = r->uri;
! const char *w, *dname, *redirect;
char *x = NULL;
if (userdirs == NULL || !strcasecmp(userdirs, "disabled") ||
***************
*** 122,128 ****
}
while (*userdirs) {
! char *userdir = getword_conf (r->pool, &userdirs);
char *filename = NULL;
dname = name + 2;
--- 121,127 ----
}
while (*userdirs) {
! const char *userdir = getword_conf (r->pool, &userdirs);
char *filename = NULL;
dname = name + 2;
1.26 +13 -5 apache/src/util.c
Index: util.c
===================================================================
RCS file: /export/home/cvs/apache/src/util.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C3 -r1.25 -r1.26
*** util.c 1996/10/19 16:08:58 1.25
--- util.c 1996/10/20 18:03:37 1.26
***************
*** 50,57 ****
*
*/
- /* $Id: util.c,v 1.25 1996/10/19 16:08:58 ben Exp $ */
-
/*
* str.c: string utility things
*
--- 50,55 ----
***************
*** 375,381 ****
((char *)file)[i] = '/';
}
! char *getword(pool* atrans, char **line, char stop) {
int pos = ind(*line, stop);
char *res;
--- 373,384 ----
((char *)file)[i] = '/';
}
! char *getword_nc(pool* atrans, char **line, char stop)
! {
! return getword(atrans,(const char **)line,stop);
! }
!
! char *getword(pool* atrans, const char **line, char stop) {
int pos = ind(*line, stop);
char *res;
***************
*** 467,474 ****
return result;
}
! char *getword_conf(pool* p, char **line) {
! char *str = *line, *strend, *res;
char quote;
while (*str && isspace (*str))
--- 470,482 ----
return result;
}
! char *getword_conf_nc(pool* p, char **line) {
! return getword_conf(p,(const char **)line);
! }
!
! char *getword_conf(pool* p, const char **line) {
! const char *str = *line, *strend;
! char *res;
char quote;
while (*str && isspace (*str))
1.23 +1 -4 apache/src/util_script.c
Index: util_script.c
===================================================================
RCS file: /export/home/cvs/apache/src/util_script.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C3 -r1.22 -r1.23
*** util_script.c 1996/08/20 20:18:13 1.22
--- util_script.c 1996/10/20 18:03:37 1.23
***************
*** 50,58 ****
*
*/
- /* $Id: util_script.c,v 1.22 1996/08/20 20:18:13 akosut Exp $ */
-
-
#define CORE_PRIVATE
#include "httpd.h"
#include "http_config.h"
--- 50,55 ----
***************
*** 473,479 ****
if (!strncmp("/~",r->uri,2)) {
r->uri += 2;
! if ((pw = getpwnam (getword (r->pool, &r->uri, '/'))) == NULL) {
log_unixerr("getpwnam", NULL, "invalid username", r->server);
return;
}
--- 470,476 ----
if (!strncmp("/~",r->uri,2)) {
r->uri += 2;
! if ((pw = getpwnam (getword_nc (r->pool, &r->uri, '/'))) == NULL) {
log_unixerr("getpwnam", NULL, "invalid username", r->server);
return;
}