cvs commit: apache-1.3/src CHANGES
coar98/08/06 16:32:03 Modified:htdocs/manual/mod mod_speling.html src/modules/standard mod_speling.c src CHANGES Log: Allow CheckSpelling to be used anywhere, not just at the server level. Revision ChangesPath 1.9 +27 -12apache-1.3/htdocs/manual/mod/mod_speling.html Index: mod_speling.html === RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/mod_speling.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_speling.html 1998/05/20 14:12:59 1.8 +++ mod_speling.html 1998/08/06 23:31:55 1.9 @@ -70,8 +70,14 @@ Context: server config, virtual host + >Context: server config, virtual host, + directory, .htaccess Override: Options + + Status: Base @@ -85,20 +91,29 @@ >Compatibility: CheckSpelling was available as a separately available module for Apache 1.1, but was limited to miscapitalizations. - As of Apache 1.3, it is part of the Apache distribution. - + As of Apache 1.3, it is part of the Apache distribution. Prior to + Apache 1.3.2, the CheckSpelling directive was only available + in the "server" and "virtual host" contexts. + This directive enables or disables the spelling module. When enabled, keep in mind that + - the directory scan which is necessary for the spelling - correction will have an impact on the server's performance - when many spelling corrections have to be performed at the same time. - the document trees should not contain sensitive files which could - be matched inadvertently, by a spelling "correction". - the module is unable to correct misspelled user names - (as in http://my.host/~apahce/), just file names or - directory names. + the directory scan which is necessary for the spelling + correction will have an impact on the server's performance + when many spelling corrections have to be performed at the same time. + + the document trees should not contain sensitive files which could + be matched inadvertently by a spelling "correction". + + the module is unable to correct misspelled user names + (as in http://my.host/~apahce/), just file names or + directory names. + + spelling corrections apply strictly to existing files, so a request for + themay get incorrectly treated + as the negotiated file "/stats.html". + 1.24 +47 -14apache-1.3/src/modules/standard/mod_speling.c Index: mod_speling.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_speling.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- mod_speling.c 1998/08/06 17:31:11 1.23 +++ mod_speling.c 1998/08/06 23:31:59 1.24 @@ -85,31 +85,64 @@ MODULE_VAR_EXPORT module speling_module; +typedef struct { +int enabled; +} spconfig; + +/* + * Create a configuration specific to this module for a server or directory + * location, and fill it with the default settings. + * + * The API says that in the absence of a merge function, the record for the + * closest ancestor is used exclusively. That's what we want, so we don't + * bother to have such a function. + */ + +static void *mkconfig(pool *p) +{ +spconfig *cfg = ap_pcalloc(p, sizeof(spconfig)); + +cfg->enabled = 0; +return cfg; +} + /* - * We use the "unconventional" mod_userdir approach here. And heck, - * here it's just one int! + * Respond to a callback to create configuration record for a server or + * vhost environment. */ +static void *create_mconfig_for_server(pool *p, server_rec *s) +{ +return mkconfig(p); +} -static void *create_speling_config(pool *dummy, server_rec *s) +/* + * Respond to a callback to create a config record for a specific directory. + */ +static void *create_mconfig_for_directory(pool *p, char *dir) { -return (void *) 0; +return mkconfig(p); } -static const char *set_speling(cmd_parms *cmd, void *dummy, int arg) +/* + * Handler for the CheckSpelling directive, which is FLAG. + */ +static const char *set_speling(cmd_parms *cmd, void *mconfig, int arg) { -void *server_conf = cmd->server->module_config; +spconfig *cfg = (spconfig *) mconfig; -/* any non-NULL pointer means speling is enabled */ -ap_set_module_config(server_conf, &speling_module, - arg ? (void *) &speling_module : NULL); +cfg->enabled = arg; return NULL; } +/* + * Define the directives specific to this module. This structure is referenced + * later by
cvs commit: apache-1.3/htdocs/manual/misc FAQ.html
jim 98/08/06 13:46:14 Modified:htdocs/manual/misc FAQ.html Log: Some HTML error cleanups (according to DreamWeaver AND Alpha and BBEdit) as well as a start of a "how to submit a patch" FAQ Revision ChangesPath 1.126 +42 -15apache-1.3/htdocs/manual/misc/FAQ.html Index: FAQ.html === RCS file: /export/home/cvs/apache-1.3/htdocs/manual/misc/FAQ.html,v retrieving revision 1.125 retrieving revision 1.126 diff -u -r1.125 -r1.126 --- FAQ.html 1998/08/05 18:04:50 1.125 +++ FAQ.html 1998/08/06 20:46:12 1.126 @@ -14,7 +14,7 @@ Apache Server Frequently Asked Questions - $Revision: 1.125 $ ($Date: 1998/08/05 18:04:50 $) + $Revision: 1.126 $ ($Date: 1998/08/06 20:46:12 $) The latest version of this FAQ is always available from the main @@ -290,6 +290,9 @@ My .htaccess files are being ignored. + + How do I submit a patch to the Apache Group? + @@ -412,7 +415,7 @@ occasional users. - + @@ -546,7 +549,7 @@ (dbx) where - + (Substitute the appropriate locations for your ServerRoot and your httpd and @@ -612,7 +615,7 @@ AddHandler cgi-script .cgi - + The server will then recognize that all files in that location (and its logical descendants) that end in ".cgi" @@ -624,7 +627,7 @@ declaration that includes the ExecCGI option. - + In some situations, you might not want to actually allow all files named "*.cgi" to be executable. @@ -646,7 +649,7 @@ RewriteRule ^quux\.cgi$ - [T=application/x-httpd-cgi] - + Make sure that the directory location is covered by an Options @@ -654,7 +657,7 @@ FollowSymLinks option. - + @@ -697,7 +700,7 @@ } - + This is generally only necessary when you are calling external programs from your script that send output to stdout, or if there will @@ -758,7 +761,7 @@ AddHandler server-parsed .shtml - + This indicates that all files ending in ".shtml" in that location (or its descendants) should be parsed. Note that using @@ -1177,7 +1180,7 @@ BrowserMatch JDK/1.0 force-response-1.0 - + More information about this issue can be found in the http://www.apache.org/info/jdk-102.html"; @@ -1290,7 +1293,7 @@ This hurts performance and should only be used as a last resort. - + @@ -1363,7 +1366,7 @@ EXTRA_CFLAGS=-DMAXIMUM_DNS - + This will cause Apache to be very paranoid about making sure a particular host address is really assigned to the name it @@ -1441,7 +1444,7 @@ AddType audio/x-midi .mid .midi .kar - + Note that this may break browsers that do recognize the audio/midi MIME type unless they're prepared to also @@ -1582,7 +1585,7 @@ EXTRA_LIBS=-lbind - + @@ -1692,7 +1695,7 @@ satisfy any - + See the user authentication question and the mod_access @@ -2295,6 +2298,30 @@ it covers the directory you are trying to use the .htaccess file in. This is normally accomplished by ensuring it is inside the proper Directory container. + + + + How do I submit a patch to the Apache Group? + + The Apache Group encourages patches from outside developers. There are 2 main "types" + of patches: small bugfixes and general improvements. Bugfixes should be sent to the + Apache http://www.apache.org/bug_report.html";>bug report page. + Improvements, modifications and additions should follow these instructions. + + In general, the first course of action is to be a member of the + new-httpd@apache.org mailing list. This indicates to the Group that + you are closely following the latest Apache developments. Your patch file should be + generated using either 'diff -c' or 'diff -u' against the + latest CVS tree. To submit your patch, send Email to new-httpd@apache.org + with a Subject: line that starts with [PATCH] and + includes a general description of the patch. In the body of the message, the + patch should be clearly described and then included at the end of the message. + If the patch-file is long, you can note a URL to the file instead of the file + itself. Use of MIME enclosures/attachments should be avoided. + + Be prepared to respond to any questions
cvs commit: apache-devsite mmn.txt
dougm 98/08/06 12:24:49 Modified:.mmn.txt Log: add ap_custom_response() Revision ChangesPath 1.31 +2 -1 apache-devsite/mmn.txt Index: mmn.txt === RCS file: /export/home/cvs/apache-devsite/mmn.txt,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- mmn.txt 1998/08/06 19:14:36 1.30 +++ mmn.txt 1998/08/06 19:24:47 1.31 @@ -79,4 +79,5 @@ 5. apctype.h -> ap_ctype.h 19980806 (1.3.2-dev) - add ap_log_rerror() - add ap_scan_script_header_err_core() - - add ap_uuencode() \ No newline at end of file + - add ap_uuencode() + - add ap_custom_response() \ No newline at end of file
cvs commit: apache-1.3/src/main http_core.c
dougm 98/08/06 12:23:47 Modified:src CHANGES src/include http_core.h src/main http_core.c Log: API: new ap_custom_response() function for hooking into the ErrorDocument mechanism at runtime Submitted by: Doug MacEachern Reviewed by: Ralf Revision ChangesPath 1.1008+3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1007 retrieving revision 1.1008 diff -u -r1.1007 -r1.1008 --- CHANGES 1998/08/06 19:13:50 1.1007 +++ CHANGES 1998/08/06 19:23:41 1.1008 @@ -1,5 +1,8 @@ Changes with Apache 1.3.2 + *) API: new ap_custom_response() function for hooking into the + ErrorDocument mechanism at runtime [Doug MacEachern] + *) API: new ap_uuencode() function [Doug MacEachern] *) API: scan_script_header_err_core() now "public" and renamed 1.46 +2 -1 apache-1.3/src/include/http_core.h Index: http_core.h === RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- http_core.h 1998/08/06 17:30:24 1.45 +++ http_core.h 1998/08/06 19:23:43 1.46 @@ -131,7 +131,8 @@ API_EXPORT(char *) ap_construct_url(pool *p, const char *uri, const request_rec *r); API_EXPORT(const char *) ap_get_server_name(const request_rec *r); API_EXPORT(unsigned) ap_get_server_port(const request_rec *r); - +API_EXPORT(void) ap_custom_response(request_rec *r, int status, char *string); + /* Authentication stuff. This is one of the places where compatibility * with the old config files *really* hurts; they don't discriminate at * all between different authentication schemes, meaning that we need 1.217 +20 -0 apache-1.3/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v retrieving revision 1.216 retrieving revision 1.217 diff -u -r1.216 -r1.217 --- http_core.c 1998/08/06 17:30:28 1.216 +++ http_core.c 1998/08/06 19:23:46 1.217 @@ -813,6 +813,26 @@ return NULL; } +API_EXPORT(void) ap_custom_response(request_rec *r, int status, char *string) +{ +core_dir_config *conf = + ap_get_module_config(r->per_dir_config, &core_module); +int idx; + +if(conf->response_code_strings == NULL) { +conf->response_code_strings = + ap_pcalloc(r->pool, + sizeof(*conf->response_code_strings) * + RESPONSE_CODES); +} + +idx = ap_index_of_response(status); + +conf->response_code_strings[idx] = + ((ap_is_url(string) || (*string == '/')) && (*string != '"')) ? + ap_pstrdup(r->pool, string) : ap_pstrcat(r->pool, "\"", string, NULL); +} + static const char *set_error_document(cmd_parms *cmd, core_dir_config *conf, char *line) {
cvs commit: apache-devsite mmn.txt
dougm 98/08/06 12:14:37 Modified:.mmn.txt Log: add ap_uuencode() Revision ChangesPath 1.30 +1 -0 apache-devsite/mmn.txt Index: mmn.txt === RCS file: /export/home/cvs/apache-devsite/mmn.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- mmn.txt 1998/08/06 18:59:24 1.29 +++ mmn.txt 1998/08/06 19:14:36 1.30 @@ -79,3 +79,4 @@ 5. apctype.h -> ap_ctype.h 19980806 (1.3.2-dev) - add ap_log_rerror() - add ap_scan_script_header_err_core() + - add ap_uuencode() \ No newline at end of file
cvs commit: apache-1.3/src/main util.c
dougm 98/08/06 12:13:55 Modified:src CHANGES src/include httpd.h src/main util.c Log: API: new ap_uuencode() function Reviewed by: Ralf, Dean Revision ChangesPath 1.1007+2 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1006 retrieving revision 1.1007 diff -u -r1.1006 -r1.1007 --- CHANGES 1998/08/06 18:58:16 1.1006 +++ CHANGES 1998/08/06 19:13:50 1.1007 @@ -1,5 +1,7 @@ Changes with Apache 1.3.2 + *) API: new ap_uuencode() function [Doug MacEachern] + *) API: scan_script_header_err_core() now "public" and renamed ap_scan_script_header_err_core() [Doug MacEachern] 1.230 +1 -0 apache-1.3/src/include/httpd.h Index: httpd.h === RCS file: /export/home/cvs/apache-1.3/src/include/httpd.h,v retrieving revision 1.229 retrieving revision 1.230 diff -u -r1.229 -r1.230 --- httpd.h 1998/08/03 09:14:48 1.229 +++ httpd.h 1998/08/06 19:13:52 1.230 @@ -889,6 +889,7 @@ API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp); API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp); API_EXPORT(char *) ap_uudecode(pool *, const char *); +API_EXPORT(char *) ap_uuencode(pool *p, char *string); #ifdef OS2 void os2pathname(char *path); #endif 1.130 +22 -0 apache-1.3/src/main/util.c Index: util.c === RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v retrieving revision 1.129 retrieving revision 1.130 diff -u -r1.129 -r1.130 --- util.c1998/08/06 01:09:30 1.129 +++ util.c1998/08/06 19:13:53 1.130 @@ -1726,6 +1726,28 @@ return bufplain; } +static const char basis_64[] = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +API_EXPORT(char *) ap_uuencode(pool *a, char *string) +{ +int i, len = strlen(string); +char *p; +char *encoded = (char *) ap_pcalloc(a, (len+2) / 3 * 4); + +p = encoded; +for (i = 0; i < len; i += 3) { +*p++ = basis_64[string[i] >> 2]; +*p++ = basis_64[((string[i] & 0x3) << 4) | ((int) (string[i + 1] & 0xF0) >> 4)]; +*p++ = basis_64[((string[i + 1] & 0xF) << 2) | ((int) (string[i + 2] & 0xC0) >> 6)]; +*p++ = basis_64[string[i + 2] & 0x3F]; +} +*p-- = '\0'; +*p-- = '='; +*p-- = '='; +return encoded; +} + #ifdef OS2 void os2pathname(char *path) {
cvs commit: apache-devsite mmn.txt
dougm 98/08/06 11:59:24 Modified:.mmn.txt Log: add ap_scan_script_header_err_core() Revision ChangesPath 1.29 +1 -0 apache-devsite/mmn.txt Index: mmn.txt === RCS file: /export/home/cvs/apache-devsite/mmn.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- mmn.txt 1998/08/06 17:32:37 1.28 +++ mmn.txt 1998/08/06 18:59:24 1.29 @@ -78,3 +78,4 @@ 4. compat.h-> ap_compat.h 5. apctype.h -> ap_ctype.h 19980806 (1.3.2-dev) - add ap_log_rerror() + - add ap_scan_script_header_err_core()
cvs commit: apache-1.3/src/main util_script.c
dougm 98/08/06 11:58:22 Modified:src CHANGES src/include util_script.h src/main util_script.c Log: API: scan_script_header_err_core() now "public" and renamed ap_scan_script_header_err_core() Submitted by: Doug MacEachern Reviewed by: Ralf Revision ChangesPath 1.1006+3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1005 retrieving revision 1.1006 diff -u -r1.1005 -r1.1006 --- CHANGES 1998/08/06 17:42:49 1.1005 +++ CHANGES 1998/08/06 18:58:16 1.1006 @@ -1,5 +1,8 @@ Changes with Apache 1.3.2 + *) API: scan_script_header_err_core() now "public" and renamed + ap_scan_script_header_err_core() [Doug MacEachern] + *) The 'status' module will now show the process pid's and their state even without full STATUS accounting. [Jim Jagielski] 1.34 +3 -0 apache-1.3/src/include/util_script.h Index: util_script.h === RCS file: /export/home/cvs/apache-1.3/src/include/util_script.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- util_script.h 1998/06/13 15:22:49 1.33 +++ util_script.h 1998/08/06 18:58:20 1.34 @@ -78,6 +78,9 @@ API_EXPORT(int) ap_scan_script_header_err(request_rec *r, FILE *f, char *buffer); API_EXPORT(int) ap_scan_script_header_err_buff(request_rec *r, BUFF *f, char *buffer); +API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, +int (*getsfunc) (char *, int, void *), +void *getsfunc_data); API_EXPORT(void) ap_send_size(size_t size, request_rec *r); API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0, char **env, int shellcmd); 1.127 +3 -3 apache-1.3/src/main/util_script.c Index: util_script.c === RCS file: /export/home/cvs/apache-1.3/src/main/util_script.c,v retrieving revision 1.126 retrieving revision 1.127 diff -u -r1.126 -r1.127 --- util_script.c 1998/08/06 17:30:32 1.126 +++ util_script.c 1998/08/06 18:58:21 1.127 @@ -410,7 +410,7 @@ } -static int scan_script_header_err_core(request_rec *r, char *buffer, +API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, int (*getsfunc) (char *, int, void *), void *getsfunc_data) { @@ -559,7 +559,7 @@ API_EXPORT(int) ap_scan_script_header_err(request_rec *r, FILE *f, char *buffer) { -return scan_script_header_err_core(r, buffer, getsfunc_FILE, f); +return ap_scan_script_header_err_core(r, buffer, getsfunc_FILE, f); } static int getsfunc_BUFF(char *w, int len, void *fb) @@ -570,7 +570,7 @@ API_EXPORT(int) ap_scan_script_header_err_buff(request_rec *r, BUFF *fb, char *buffer) { -return scan_script_header_err_core(r, buffer, getsfunc_BUFF, fb); +return ap_scan_script_header_err_core(r, buffer, getsfunc_BUFF, fb); }
cvs commit: apache-1.3/src/modules/standard mod_status.c
jim 98/08/06 10:42:52 Modified:src CHANGES src/modules/standard mod_status.c Log: Hmmm... we have access to the subprocesses pids, let's use them. Now we can tell which process is in which state even without full STATUS Revision ChangesPath 1.1005+3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1004 retrieving revision 1.1005 diff -u -r1.1004 -r1.1005 --- CHANGES 1998/08/06 17:30:18 1.1004 +++ CHANGES 1998/08/06 17:42:49 1.1005 @@ -1,5 +1,8 @@ Changes with Apache 1.3.2 + *) The 'status' module will now show the process pid's and their + state even without full STATUS accounting. [Jim Jagielski] + *) Restore the client IP address to the error log messages, this was lost during the transition from 1.2 to 1.3. Add a new function ap_log_rerror() which takes a request_rec * and 1.92 +11 -0 apache-1.3/src/modules/standard/mod_status.c Index: mod_status.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_status.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -r1.91 -r1.92 --- mod_status.c 1998/08/06 17:31:14 1.91 +++ mod_status.c 1998/08/06 17:42:51 1.92 @@ -241,6 +241,7 @@ short_score score_record; parent_score ps_record; char stat_buffer[HARD_SERVER_LIMIT]; +int pid_buffer[HARD_SERVER_LIMIT]; clock_t tu, ts, tcu, tcs; tu = ts = tcu = tcs = 0; @@ -296,6 +297,7 @@ ps_record = ap_scoreboard_image->parent[i]; res = score_record.status; stat_buffer[i] = status_flags[res]; + pid_buffer[i] = (int) ps_record.pid; if (res == SERVER_READY) ready++; else if (res != SERVER_DEAD) @@ -428,6 +430,15 @@ ap_rputs("\"L\" Logging, \n", r); ap_rputs("\"G\" Gracefully finishing, \n", r); ap_rputs("\".\" Open slot with no current process\n", r); + ap_rputs("\n", r); + ap_rputs("PID Key: \n", r); + ap_rputs("\n", r); + for (i = 0; i < HARD_SERVER_LIMIT; ++i) { + if (stat_buffer[i] != '.') + ap_rprintf(r, "%d in state: %c \n", pid_buffer[i], + stat_buffer[i]); + } + ap_rputs("\n", r); } #if defined(STATUS)
cvs commit: apache-devsite mmn.txt
dgaudet 98/08/06 10:32:37 Modified:.mmn.txt Log: update for ap_log_rerror Revision ChangesPath 1.28 +1 -0 apache-devsite/mmn.txt Index: mmn.txt === RCS file: /export/home/cvs/apache-devsite/mmn.txt,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- mmn.txt 1998/07/13 11:56:41 1.27 +++ mmn.txt 1998/08/06 17:32:37 1.28 @@ -77,3 +77,4 @@ 3. ap_config.h -> ap_config_auto.h / in the config process 4. compat.h-> ap_compat.h 5. apctype.h -> ap_ctype.h +19980806 (1.3.2-dev) - add ap_log_rerror()
cvs commit: apache-1.3/src/os/win32 mod_isapi.c
dgaudet 98/08/06 10:31:34 Modified:src CHANGES src/include http_config.h http_core.h http_log.h src/main http_config.c http_core.c http_log.c http_main.c http_protocol.c http_request.c util_script.c src/modules/proxy mod_proxy.c proxy_cache.c proxy_connect.c proxy_ftp.c proxy_http.c proxy_util.c src/modules/standard mod_access.c mod_actions.c mod_asis.c mod_auth.c mod_auth_anon.c mod_auth_db.c mod_auth_dbm.c mod_autoindex.c mod_cern_meta.c mod_cgi.c mod_digest.c mod_expires.c mod_imap.c mod_include.c mod_info.c mod_mime_magic.c mod_negotiation.c mod_rewrite.c mod_speling.c mod_status.c src/os/win32 mod_isapi.c Log: Correct the error_log mess in a uniform manner. Add ap_log_rerror() which includes the client ip address in the log message (it takes a request_rec * instead of a server_rec *). PR: 2661 Revision ChangesPath 1.1004+5 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1003 retrieving revision 1.1004 diff -u -r1.1003 -r1.1004 --- CHANGES 1998/08/06 00:10:36 1.1003 +++ CHANGES 1998/08/06 17:30:18 1.1004 @@ -1,5 +1,10 @@ Changes with Apache 1.3.2 + *) Restore the client IP address to the error log messages, this + was lost during the transition from 1.2 to 1.3. Add a new + function ap_log_rerror() which takes a request_rec * and + formats it appropriately. [Dean Gaudet] PR#2661 + *) Cure ap_cfg_getline() of its nasty habit of compressing internal whitespace in input lines -- including within quoted strings. [Ken Coar] 1.91 +1 -1 apache-1.3/src/include/http_config.h Index: http_config.h === RCS file: /export/home/cvs/apache-1.3/src/include/http_config.h,v retrieving revision 1.90 retrieving revision 1.91 diff -u -r1.90 -r1.91 --- http_config.h 1998/07/13 11:32:35 1.90 +++ http_config.h 1998/08/06 17:30:23 1.91 @@ -275,7 +275,7 @@ * handle it back-compatibly, or at least signal an error). */ -#define MODULE_MAGIC_NUMBER 19980713 +#define MODULE_MAGIC_NUMBER 19980806 #define STANDARD_MODULE_STUFF MODULE_MAGIC_NUMBER, -1, __FILE__, NULL, NULL /* Generic accessors for other modules to get at their own module-specific 1.45 +19 -0 apache-1.3/src/include/http_core.h Index: http_core.h === RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- http_core.h 1998/07/01 21:19:51 1.44 +++ http_core.h 1998/08/06 17:30:24 1.45 @@ -86,9 +86,28 @@ #define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_SYM_LINKS|OPT_EXECCGI) /* options for get_remote_host() */ +/* REMOTE_HOST returns the hostname, or NULL if the hostname + * lookup fails. It will force a DNS lookup according to the + * HostnameLookups setting. + */ #define REMOTE_HOST (0) + +/* REMOTE_NAME returns the hostname, or the dotted quad if the + * hostname lookup fails. It will force a DNS lookup according + * to the HostnameLookups setting. + */ #define REMOTE_NAME (1) + +/* REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is + * never forced. + */ #define REMOTE_NOLOOKUP (2) + +/* REMOTE_DOUBLE_REV will always force a DNS lookup, and also force + * a double reverse lookup, regardless of the HostnameLookups + * setting. The result is the (double reverse checked) hostname, + * or NULL if any of the lookups fail. + */ #define REMOTE_DOUBLE_REV (3) #define SATISFY_ALL 0 1.31 +6 -0 apache-1.3/src/include/http_log.h Index: http_log.h === RCS file: /export/home/cvs/apache-1.3/src/include/http_log.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- http_log.h1998/05/03 17:31:08 1.30 +++ http_log.h1998/08/06 17:30:24 1.31 @@ -108,9 +108,15 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level, const server_rec *s, const char *fmt, ...) __attribute__((format(printf,5,6))); +API_EXPORT(void) ap_log_rerror(const char *file, int line, int level, + const request_rec *s, const char *fmt, ...) + __attribute__((format(printf,5,6
cvs commit: apache-1.3/src/modules/standard mod_speling.c
coar98/08/05 19:38:11 Modified:src/modules/standard mod_speling.c Log: Stylistic cleanup, since I think I may be doing some work in here soon. If this breaks any outstanding mods anyone has.. well, mod_speling??? Revision ChangesPath 1.22 +98 -53apache-1.3/src/modules/standard/mod_speling.c Index: mod_speling.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_speling.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- mod_speling.c 1998/07/08 17:47:18 1.21 +++ mod_speling.c 1998/08/06 02:38:10 1.22 @@ -68,7 +68,8 @@ * capitalizations. If it finds a match, it sends a redirect. * * 08-Aug-1997 <[EMAIL PROTECTED]> - * o Upgraded module interface to apache_1.3a2-dev API (more NULL's in speling_module). + * o Upgraded module interface to apache_1.3a2-dev API (more NULL's in + * speling_module). * o Integrated tcsh's "spelling correction" routine which allows one * misspelling (character insertion/omission/typo/transposition). * Rewrote it to ignore case as well. This ought to catch the majority @@ -84,7 +85,8 @@ MODULE_VAR_EXPORT module speling_module; -/* We use the "unconventional" mod_userdir approach here. And heck, +/* + * We use the "unconventional" mod_userdir approach here. And heck, * here it's just one int! */ @@ -98,7 +100,8 @@ void *server_conf = cmd->server->module_config; /* any non-NULL pointer means speling is enabled */ -ap_set_module_config(server_conf, &speling_module, arg ? (void *) &speling_module : NULL); +ap_set_module_config(server_conf, &speling_module, + arg ? (void *) &speling_module : NULL); return NULL; } @@ -156,22 +159,29 @@ static sp_reason spdist(const char *s, const char *t) { -for (; ap_tolower(*s) == ap_tolower(*t); t++, s++) -if (*t == '\0') +for (; ap_tolower(*s) == ap_tolower(*t); t++, s++) { +if (*t == '\0') { return SP_MISCAPITALIZED; /* exact match (sans case) */ + } +} if (*s) { if (*t) { -if (s[1] && t[1] && ap_tolower(*s) == ap_tolower(t[1]) && - ap_tolower(*t) == ap_tolower(s[1]) && strcasecmp(s + 2, t + 2) == 0) +if (s[1] && t[1] && ap_tolower(*s) == ap_tolower(t[1]) + && ap_tolower(*t) == ap_tolower(s[1]) + && strcasecmp(s + 2, t + 2) == 0) { return SP_TRANSPOSITION;/* transposition */ -if (strcasecmp(s + 1, t + 1) == 0) + } +if (strcasecmp(s + 1, t + 1) == 0) { return SP_SIMPLETYPO; /* 1 char mismatch */ + } } -if (strcasecmp(s + 1, t) == 0) +if (strcasecmp(s + 1, t) == 0) { return SP_EXTRACHAR;/* extra character */ + } } -if (*t && strcasecmp(s, t + 1) == 0) +if (*t && strcasecmp(s, t + 1) == 0) { return SP_MISSINGCHAR; /* missing character */ +} return SP_VERYDIFFERENT;/* distance too large to fix. */ } @@ -190,20 +200,24 @@ struct DIR_TYPE *dir_entry; array_header *candidates = NULL; -if (!ap_get_module_config(server_conf, &speling_module)) +if (!ap_get_module_config(server_conf, &speling_module)) { return DECLINED; +} /* We only want to worry about GETs */ -if (r->method_number != M_GET) +if (r->method_number != M_GET) { return DECLINED; +} /* We've already got a file of some kind or another */ -if (r->proxyreq || (r->finfo.st_mode != 0)) +if (r->proxyreq || (r->finfo.st_mode != 0)) { return DECLINED; +} /* This is a sub request - don't mess with it */ -if (r->main) +if (r->main) { return DECLINED; +} /* * The request should end up looking like this: @@ -214,9 +228,13 @@ */ filoc = ap_rind(r->filename, '/'); -/* Don't do anything if the request doesn't contain a slash, or requests "/" */ -if (filoc == -1 || strcmp(r->uri, "/") == 0) +/* + * Don't do anything if the request doesn't contain a slash, or + * requests "/" + */ +if (filoc == -1 || strcmp(r->uri, "/") == 0) { return DECLINED; +} /* good = /correct-file */ good = ap_pstrndup(r->pool, r->filename, filoc); @@ -229,22 +247,25 @@ pglen = strlen(postgood); /* Check to see if the URL pieces add up */ -if (strcmp(postgood, r->uri + (urlen - pglen))) +if (strcmp(postgood, r->uri + (urlen - pglen))) { return DECLINED; +} /* url = /correct-url */ url = ap_pstrndu
cvs commit: apache-1.3/src/main util_script.c
stoddard98/08/05 19:03:39 Modified:src/main util_script.c Log: Ref PR2356 - Handle SSI exec tag correctly. In ap_call_exec, handle shellcmd parameter, use COMMAND.COM on Win95 and CMD.EXE on NT. Revision ChangesPath 1.125 +96 -80apache-1.3/src/main/util_script.c Index: util_script.c === RCS file: /export/home/cvs/apache-1.3/src/main/util_script.c,v retrieving revision 1.124 retrieving revision 1.125 diff -u -r1.124 -r1.125 --- util_script.c 1998/08/05 23:07:54 1.124 +++ util_script.c 1998/08/06 02:03:38 1.125 @@ -795,86 +795,92 @@ quoted_filename = ap_pstrcat(r->pool, "\"", r->filename, "\"", NULL); - exename = strrchr(r->filename, '/'); - if (!exename) { - exename = strrchr(r->filename, '\\'); - } - if (!exename) { - exename = r->filename; - } - else { - exename++; - } - dot = strrchr(exename, '.'); - if (dot) { - if (!strcasecmp(dot, ".BAT") - || !strcasecmp(dot, ".CMD") - || !strcasecmp(dot, ".EXE") - || !strcasecmp(dot, ".COM")) { - is_exe = 1; - } - } - - if (!is_exe) { - program = fopen(r->filename, "rb"); - if (!program) { - ap_log_error(APLOG_MARK, APLOG_ERR, r->server, - "fopen(%s) failed", r->filename); - return (pid); - } - sz = fread(interpreter, 1, sizeof(interpreter) - 1, program); - if (sz < 0) { - ap_log_error(APLOG_MARK, APLOG_ERR, r->server, - "fread of %s failed", r->filename); - fclose(program); - return (pid); - } - interpreter[sz] = 0; - fclose(program); - if (!strncmp(interpreter, "#!", 2)) { - is_script = 1; - for (i = 2; i < sizeof(interpreter); i++) { - if ((interpreter[i] == '\r') - || (interpreter[i] == '\n')) { - break; - } - } - interpreter[i] = 0; - for (i = 2; interpreter[i] == ' '; ++i) - ; - memmove(interpreter+2,interpreter+i,strlen(interpreter+i)+1); - } - else { - /* Check to see if it's a executable */ -IMAGE_DOS_HEADER *hdr = (IMAGE_DOS_HEADER*)interpreter; -if (hdr->e_magic == IMAGE_DOS_SIGNATURE && hdr->e_cblp < 512) { -is_binary = 1; - } - } - } -/* Bail out if we haven't figured out what kind of - * file this is by now.. - */ -if (!is_exe && !is_script && !is_binary) { -ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r->server, - "%s is not executable; ensure interpreted scripts have " - "\"#!\" first line", - r->filename); -return (pid); - } +if (!shellcmd) { +exename = strrchr(r->filename, '/'); +if (!exename) { +exename = strrchr(r->filename, '\\'); +} +if (!exename) { +exename = r->filename; +} +else { +exename++; +} +dot = strrchr(exename, '.'); +if (dot) { +if (!strcasecmp(dot, ".BAT") +|| !strcasecmp(dot, ".CMD") +|| !strcasecmp(dot, ".EXE") +|| !strcasecmp(dot, ".COM")) { +is_exe = 1; +} +} - /* - * Make child process use hPipeOutputWrite as standard out, - * and make sure it does not show on screen. - */ - si.cb = sizeof(si); - si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; - si.wShowWindow = SW_HIDE; - si.hStdInput = pinfo->hPipeInputRead; - si.hStdOutput = pinfo->hPipeOutputWrite; - si.hStdError = pinfo->hPipeErrorWrite; +if (!is_exe) { +program = fopen(r->filename, "rb"); +if (!program) { +ap_log_error(APLOG_MARK, APLOG_ERR, r->server, + "fopen(%s) failed", r->filename); +return (pid); +} +sz = fread(interpreter, 1, sizeof(interpreter) - 1, program); +if (sz < 0) { +ap_log_error(APLOG_MARK, APLOG_ERR, r->server, + "fread of %s failed", r->filename); +fclose(program); +return (pid); +} +
cvs commit: apache-1.3/src/main util.c
coar98/08/05 18:09:31 Modified:src/main util.c Log: There's no point in going further back than the starting point we just reset.. Revision ChangesPath 1.129 +1 -1 apache-1.3/src/main/util.c Index: util.c === RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -r1.128 -r1.129 --- util.c1998/08/06 00:10:38 1.128 +++ util.c1998/08/06 01:09:30 1.129 @@ -871,7 +871,7 @@ ++src; /* blast trailing whitespace */ dst = &src[strlen(src)]; - while (--dst >= buf && ap_isspace(*dst)) + while (--dst >= src && ap_isspace(*dst)) *dst = '\0'; /* Zap leading whitespace by shifting */ if (src != buf)
cvs commit: apache-1.3/htdocs/manual/mod mod_proxy.html
lars98/08/05 18:05:31 Modified:htdocs/manual/mod mod_proxy.html Log: We don't want to make people think that '_' are allowed in hostnames. PR: 2788 Revision ChangesPath 1.43 +2 -2 apache-1.3/htdocs/manual/mod/mod_proxy.html Index: mod_proxy.html === RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/mod_proxy.html,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- mod_proxy.html1998/07/15 00:31:27 1.42 +++ mod_proxy.html1998/08/06 01:05:30 1.43 @@ -306,7 +306,7 @@ hostnames during startup, and cache them for match test as well. Example: - ProxyBlock joes_garage.com some_host.co.uk rocky.wotsamattau.edu + ProxyBlock joes-garage.com some-host.co.uk rocky.wotsamattau.edu 'rocky.wotsamattau.edu' would also be matched if referenced by IP address. @@ -947,7 +947,7 @@ during startup, and cache them for match test as well. Example: - NoCache joes_garage.com some_host.co.uk bullwinkle.wotsamattau.edu + NoCache joes-garage.com some-host.co.uk bullwinkle.wotsamattau.edu 'bullwinkle.wotsamattau.edu' would also be matched if referenced by IP
cvs commit: apache-1.3 STATUS
lars98/08/05 17:53:23 Modified:.STATUS Log: I'm currently to busy to test all the patches, so most votes are on concept... Revision ChangesPath 1.455 +13 -6 apache-1.3/STATUS Index: STATUS === RCS file: /home/cvs/apache-1.3/STATUS,v retrieving revision 1.454 retrieving revision 1.455 diff -u -r1.454 -r1.455 --- STATUS1998/08/04 07:12:55 1.454 +++ STATUS1998/08/06 00:53:22 1.455 @@ -33,7 +33,7 @@ lines of code to detect and handle shellcmd. COMMAND.COM is used to exec the script on Win95, CMD.EXE on NT. Message-ID: <[EMAIL PROTECTED]> - Status: Ken +1 (on concept) + Status: Ken +1 (on concept), Lars +1 (on concept) * Filenames containing whitespace characters caused problems for directives Bill Stoddard <[EMAIL PROTECTED]> @@ -45,7 +45,7 @@ and a fix for mod_include exec=cmd processing). This patch does not change the function of ap_call_exec. Message-ID: <[EMAIL PROTECTED]> - Status: Ken +1 (on concept) + Status: Ken +1 (on concept), Lars +1 (on concept) * Configure tweaks to support building outside the source tree, and add more customizeability for installation layout, by @@ -56,14 +56,14 @@ * Rhapsody port, by Wilfredo Sanchez <[EMAIL PROTECTED]> Message-Id: <[EMAIL PROTECTED]> - Status: Ken +1 (on concept) + Status: Ken +1 (on concept), Lars +1 (on concept) * Ralf's "[PATCH] Fix module init" This fixes the mod_so/mod_perl problems described under "FINAL RELEASE SHOWSTOPPERS" by doing a more correct init of the modules after loading through two new core API functions. Message-ID: <[EMAIL PROTECTED]> - Status: Ralf +1 + Status: Ralf +1, Lars +1 * Paul's patch to add integrated restart/shutdown signalling (Win32) This patch make Apache listen on predictable event names to allow @@ -71,12 +71,19 @@ option to send the shutdown or restart signal to the running parent process. Message-ID: <[EMAIL PROTECTED]> - Statue: Ken +1 (on concept) + Status: Ken +1 (on concept), Lars +1 (on concept) * Martin's patch to use the Basic Authentication scheme for (proxy-) ftp logins as well. When no password is given, but the ftp server requires one, a [401 Auth Required] response is generated on-the-fly. - See: <[EMAIL PROTECTED]> + Message-ID: <[EMAIL PROTECTED]> + Status: Lars +1 (on concept) + +* Lars' patch to work around a Navigator/Mozilla bug when mod_proxy + is used (broken images). + (Marc doesn't like it and I don't like it either, but people will + blame Apache for it, so...) + Message-ID: <[EMAIL PROTECTED]> In progress:
cvs commit: apache-1.3/src/main util.c
martin 98/08/05 17:10:39 Modified:src CHANGES src/main util.c Log: The recent changes which avoid whitespace compression in config lines failed to remove leading whitespace, so it became impossible to indent the block constructs. Fixed. Revision ChangesPath 1.1003+2 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1002 retrieving revision 1.1003 diff -u -u -r1.1002 -r1.1003 --- CHANGES 1998/08/05 01:36:35 1.1002 +++ CHANGES 1998/08/06 00:10:36 1.1003 @@ -3,6 +3,8 @@ *) Cure ap_cfg_getline() of its nasty habit of compressing internal whitespace in input lines -- including within quoted strings. [Ken Coar] + but leading and trailing whitespace should continue to be + stripped [Martin Kraemer] *) Cleanup of the PrintPath/PrintPathOS2 helper functions. Avoid the ugly use of an env. variable and use command-line args for 1.128 +4 -0 apache-1.3/src/main/util.c Index: util.c === RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v retrieving revision 1.127 retrieving revision 1.128 diff -u -u -r1.127 -r1.128 --- util.c1998/08/05 01:36:40 1.127 +++ util.c1998/08/06 00:10:38 1.128 @@ -873,6 +873,10 @@ dst = &src[strlen(src)]; while (--dst >= buf && ap_isspace(*dst)) *dst = '\0'; +/* Zap leading whitespace by shifting */ +if (src != buf) + for (dst = buf; (*dst++ = *src++) != '\0'; ) + ; #ifdef DEBUG_CFG_LINES ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL, "Read config: %s", buf);