cvs commit: apache-1.3/src/modules/standard mod_mime.c
bjh 00/02/05 19:53:14 Modified:src/modules/standard mod_mime.c Log: Use ap_isgraph instead of isgraph to avoid subscript has type `char' warning. Revision ChangesPath 1.54 +1 -1 apache-1.3/src/modules/standard/mod_mime.c Index: mod_mime.c === RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- mod_mime.c2000/01/11 14:13:49 1.53 +++ mod_mime.c2000/02/06 03:53:11 1.54 @@ -345,7 +345,7 @@ { int res; -res = (ap_isascii(c) isgraph(c) +res = (ap_isascii(c) ap_isgraph(c) (strchr(tspecial, c) == NULL)) ? 1 : -1; return res; }
cvs commit: apache-1.3/src/modules/standard mod_mime.c
ben 00/01/11 06:13:50 Modified:src CHANGES src/include httpd.h src/main http_core.c http_protocol.c http_request.c src/modules/proxy mod_proxy.c mod_proxy.h proxy_ftp.c proxy_http.c proxy_util.c src/modules/standard mod_mime.c Log: Don't convert auth to proxy auth when it shouldn't be. Revision ChangesPath 1.1491+4 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1490 retrieving revision 1.1491 diff -u -r1.1490 -r1.1491 --- CHANGES 2000/01/10 21:33:06 1.1490 +++ CHANGES 2000/01/11 14:13:37 1.1491 @@ -1,5 +1,9 @@ Changes with Apache 1.3.10 + *) ProxyPass erroneously converted authentication requests to proxy + authentication requests. Fixed. + [Ben Laurie] + *) Reverse a patch which broke HPUX shared builds. Basically we comment out the SHLIB_SUFFIX_NAME=sl line in Configure. [Ryan Bloom] 1.298 +7 -1 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.297 retrieving revision 1.298 diff -u -r1.297 -r1.298 --- httpd.h 1999/12/09 12:05:02 1.297 +++ httpd.h 2000/01/11 14:13:39 1.298 @@ -658,6 +658,12 @@ #include util_uri.h +enum proxyreqtype { +NOT_PROXY=0, +STD_PROXY, +PROXY_PASS +}; + struct request_rec { ap_pool *pool; @@ -681,7 +687,7 @@ char *the_request; /* First line of request, so we can log it */ int assbackwards;/* HTTP/0.9, simple request */ -int proxyreq;/* A proxy request (calculated during +enum proxyreqtype proxyreq;/* A proxy request (calculated during * post_read_request or translate_name) */ int header_only; /* HEAD request, as opposed to GET */ char *protocol; /* Protocol, as given to us, or HTTP/0.9 */ 1.277 +1 -1 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.276 retrieving revision 1.277 diff -u -r1.276 -r1.277 --- http_core.c 1999/12/21 07:52:55 1.276 +++ http_core.c 2000/01/11 14:13:40 1.277 @@ -2956,7 +2956,7 @@ void *sconf = r-server-module_config; core_server_config *conf = ap_get_module_config(sconf, core_module); -if (r-proxyreq) { +if (r-proxyreq != NOT_PROXY) { return HTTP_FORBIDDEN; } if ((r-uri[0] != '/') strcmp(r-uri, *)) { 1.286 +8 -5 apache-1.3/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_protocol.c,v retrieving revision 1.285 retrieving revision 1.286 diff -u -r1.285 -r1.286 --- http_protocol.c 2000/01/04 10:20:39 1.285 +++ http_protocol.c 2000/01/11 14:13:41 1.286 @@ -1162,7 +1162,8 @@ ap_note_auth_failure(r); else ap_table_setn(r-err_headers_out, - r-proxyreq ? Proxy-Authenticate : WWW-Authenticate, + r-proxyreq == STD_PROXY ? Proxy-Authenticate + : WWW-Authenticate, ap_pstrcat(r-pool, Basic realm=\, ap_auth_name(r), \, NULL)); } @@ -1170,7 +1171,8 @@ API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r) { ap_table_setn(r-err_headers_out, - r-proxyreq ? Proxy-Authenticate : WWW-Authenticate, + r-proxyreq == STD_PROXY ? Proxy-Authenticate + : WWW-Authenticate, ap_psprintf(r-pool, Digest realm=\%s\, nonce=\%lu\, ap_auth_name(r), r-request_time)); } @@ -1178,8 +1180,9 @@ API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, const char **pw) { const char *auth_line = ap_table_get(r-headers_in, - r-proxyreq ? Proxy-Authorization - : Authorization); + r-proxyreq == STD_PROXY + ? Proxy-Authorization + : Authorization); const char *t; if (!(t = ap_auth_type(r)) || strcasecmp(t, Basic)) @@ -1352,7 +1355,7 @@ /* mod_proxy is only HTTP/1.0, so avoid sending HTTP/1.1 error response; * kluge around broken browsers when indicated by force-response-1.0
cvs commit: apache-1.3/src/modules/standard mod_mime.c
martin 99/12/13 06:17:37 Modified:src/modules/standard mod_mime.c Log: Avoid *all* side effects of signed/unsigned char sign extensions. (Probably unneccessary, but this tests only the single bit 7) Revision ChangesPath 1.52 +1 -1 apache-1.3/src/modules/standard/mod_mime.c Index: mod_mime.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- mod_mime.c1999/12/10 14:51:03 1.51 +++ mod_mime.c1999/12/13 14:17:37 1.52 @@ -73,7 +73,7 @@ * defined it's not always right for our needs. Roll our own that * we can rely on. */ -#define ap_isascii(c) ((OS_ASC(c) ~0177) != 0) +#define ap_isascii(c) ((OS_ASC(c) 0x80) == 0) typedef struct handlers_info { char *name;
cvs commit: apache-1.3/src/modules/standard mod_mime.c
coar99/12/10 06:51:04 Modified:src/modules/standard mod_mime.c Log: isascii isn't universal, alas.. Submitted by: gil [EMAIL PROTECTED] Reviewed by: Martin Kraemer, Ken Coar Revision ChangesPath 1.51 +11 -3 apache-1.3/src/modules/standard/mod_mime.c Index: mod_mime.c === RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- mod_mime.c1999/12/09 18:10:34 1.50 +++ mod_mime.c1999/12/10 14:51:03 1.51 @@ -68,6 +68,13 @@ #include http_config.h #include http_log.h +/* + * isascii(c) isn't universal, and even those places where it is + * defined it's not always right for our needs. Roll our own that + * we can rely on. + */ +#define ap_isascii(c) ((OS_ASC(c) ~0177) != 0) + typedef struct handlers_info { char *name; } handlers_info; @@ -338,7 +345,7 @@ { int res; -res = (isascii(c) isgraph(c) +res = (ap_isascii(c) isgraph(c) (strchr(tspecial, c) == NULL)) ? 1 : -1; return res; } @@ -347,7 +354,8 @@ { int res; -res = (isascii(c) (c != '') (c != '\\') (c != '\n')) ? 1 : -1; +res = (ap_isascii(c) (c != '') (c != '\\') (c != '\n')) + ? 1 : -1; return res; } @@ -358,7 +366,7 @@ if (((s + 1) != NULL) (*s == '\\')) { c = (int) *(s + 1); - if (isascii(c)) { + if (ap_isascii(c)) { res = 1; } }
cvs commit: apache-1.3/src/modules/standard mod_mime.c
dgaudet 99/04/20 10:27:51 Modified:src CHANGES src/modules/standard mod_mime.c Log: islower() returns true for stuff outside a-z when locale isn't C PR: 3427 Revision ChangesPath 1.1310+3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1309 retrieving revision 1.1310 diff -u -r1.1309 -r1.1310 --- CHANGES 1999/04/20 17:03:25 1.1309 +++ CHANGES 1999/04/20 17:27:47 1.1310 @@ -1,5 +1,8 @@ Changes with Apache 1.3.7 + *) Fix the mod_mime hash table to work properly with locales other + than C. [Dean Gaudet] PR#3427 + *) Fix a memory leak which is exacerbated by certain configurations. [Dean Gaudet] PR#4225 1.49 +2 -7 apache-1.3/src/modules/standard/mod_mime.c Index: mod_mime.c === RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- mod_mime.c1999/01/01 19:05:11 1.48 +++ mod_mime.c1999/04/20 17:27:51 1.49 @@ -233,13 +233,8 @@ * get private versions through AddType... */ -/* MIME_HASHSIZE used to be 27 (26 chars and one non-alpha slot), but - * with character sets like EBCDIC, this is insufficient because the - * range 'a'...'z' is not contigous. Defining it as ('z'-'a'+2) is - * equivalent to 27 in ASCII, and makes it work in EBCDIC. - */ -#define MIME_HASHSIZE ('z'-'a'+2) -#define hash(i) (ap_isalpha(i) ? (ap_tolower(i)) - 'a' : (MIME_HASHSIZE-1)) +#define MIME_HASHSIZE (32) +#define hash(i) (ap_tolower(i) % MIME_HASHSIZE) static table *hash_buckets[MIME_HASHSIZE];
cvs commit: apache-1.3/src/modules/standard mod_mime.c
coar98/12/01 19:45:54 Modified:.STATUS htdocs/manual/mod mod_mime.html src CHANGES src/modules/standard mod_mime.c Log: Put in Paul's DefaultLanguage code. I don't recall seeing any negative comments, and it's pretty valuable for multilingual sites. Revision ChangesPath 1.546 +1 -8 apache-1.3/STATUS Index: STATUS === RCS file: /home/cvs/apache-1.3/STATUS,v retrieving revision 1.545 retrieving revision 1.546 diff -u -r1.545 -r1.546 --- STATUS1998/12/01 15:39:04 1.545 +++ STATUS1998/12/02 03:45:50 1.546 @@ -1,4 +1,4 @@ - 1.3 STATUS: + 1.3 STATUS: Release: @@ -110,13 +110,6 @@ change httpd to apache or to whatever for the particular installation. Status: Ralf +1 - -* Paul's [PATCH] adding a DefaultLanguage directive - This patch implements a DefaultLanguage directive. It sets the - language to apply to files with no explicit language set via - AddLanguage. - Message-ID: [EMAIL PROTECTED] - Status: Paul +1, Ken +1 * Michael van Elst's patch [PR#3160] to improve mod_rewrite's in-core cache handling by using a hash table. 1.26 +49 -9 apache-1.3/htdocs/manual/mod/mod_mime.html Index: mod_mime.html === RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/mod_mime.html,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- mod_mime.html 1998/11/20 15:45:36 1.25 +++ mod_mime.html 1998/12/02 03:45:51 1.26 @@ -36,11 +36,11 @@ file. Respectively they set the content-encoding, handler, content-language and MIME-type (content-type) of documents. The directive A HREF=#typesconfigTypesConfig/A is used to specify a -file which also maps extensions onto mime types. The directives A +file which also maps extensions onto MIME types. The directives A HREF=#forcetypeForceType/A and A HREF=#sethandlerSetHandler/A are used to associated all the files in a given location (EMe.g./EM, a particular directory) onto a particular -mime type or handler. +MIME type or handler. P @@ -90,6 +90,7 @@ LIA HREF=#addhandlerAddHandler/A LIA HREF=#addlanguageAddLanguage/A LIA HREF=#addtypeAddType/A +LIA HREF=#defaultlanguageDefaultLanguage/A LIA HREF=#forcetypeForceType/A LIA HREF=#sethandlerSetHandler/A LIA HREF=#typesconfigTypesConfig/A @@ -121,7 +122,7 @@ STRONGModule:/STRONG/A mod_mimeP The AddEncoding directive maps the given filename extensions to the -specified encoding type. EMMime-enc/EM is the mime encoding to use +specified encoding type. EMMIME-enc/EM is the MIME encoding to use for documents containing the EMextension/EM. This mapping is added to any already in force, overriding any mappings that already exist for the same EMextension/EM. @@ -227,7 +228,7 @@ STRONGModule:/STRONG/A mod_mimeP The AddLanguage directive maps the given filename extensions to the -specified content language. EMMime-lang/EM is the mime language of +specified content language. EMMIME-lang/EM is the MIME language of filenames containing EMextension/EM. This mapping is added to any already in force, overriding any mappings that already exist for the same EMextension/EM. @@ -275,18 +276,18 @@ STRONGModule:/STRONG/A mod_mimeP The AddType directive maps the given filename extensions onto the -specified content type. EMMime-enc/EM is the mime type to use for +specified content type. EMMIME-enc/EM is the MIME type to use for filenames containing EMextension/EM. This mapping is added to any already in force, overriding any mappings that already exist for the same EMextension/EM. This directive can be used to add mappings -not listed in the mime types file (see the CODEA +not listed in the MIME types file (see the CODEA HREF=#typesconfigTypesConfig/A/CODE directive). Example: BLOCKQUOTECODE AddType image/gif GIF /CODE/BLOCKQUOTE -It is recommended that new mime types be added using the AddType directive +It is recommended that new MIME types be added using the AddType directive rather than changing the A HREF=#typesconfigTypesConfig/A file.P Note that, unlike the NCSA httpd, this directive cannot be used to set the type of particular files.P @@ -298,6 +299,45 @@ HR +H2A NAME=defaultlanguageDefaultLanguage/A/H2 +!--%plaintext lt;?INDEX {\tt DefaultLanguage} directivegt; -- +A + HREF=directive-dict.html#Syntax + REL=Help +STRONGSyntax:/STRONG/A DefaultLanguage EMMIME-lang/EMBR +A + HREF=directive-dict.html#Context + REL=Help +STRONGContext:/STRONG/A server config, virtual host, directory, .htaccessBR +A
cvs commit: apache-1.3/src/modules/standard mod_mime.c
coar98/10/23 12:28:54 Modified:.STATUS src CHANGES src/modules/standard mod_mime.c Log: Allow selective dissociation of handlers from file extensions. PR: 1799 Submitted by: Ryan Bloom [EMAIL PROTECTED] Reviewed by: Ken Coar Revision ChangesPath 1.520 +0 -12 apache-1.3/STATUS Index: STATUS === RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.519 retrieving revision 1.520 diff -u -r1.519 -r1.520 --- STATUS1998/10/21 16:00:42 1.519 +++ STATUS1998/10/23 19:28:50 1.520 @@ -168,18 +168,6 @@ In particular this affects the correctness of the proxy and the vhost mechanism. -* PR#1799: we need to add a default or none handler to deal with - filenames such as foo.map.gif which aren't image maps, and shouldn't - be considered such. See discussion in - [EMAIL PROTECTED] - [EMAIL PROTECTED] - [EMAIL PROTECTED] - [EMAIL PROTECTED] - (feb98 archives) - Jim: I thought that we decided default, although Ken - thought it ugly - Ken: I just don't like using Add when reverting something; not a -1 - * proxy_*_canon routines use r-proxyreq incorrectly. See [EMAIL PROTECTED] 1.1122+4 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1121 retrieving revision 1.1122 diff -u -r1.1121 -r1.1122 --- CHANGES 1998/10/23 19:06:24 1.1121 +++ CHANGES 1998/10/23 19:28:51 1.1122 @@ -1,5 +1,9 @@ Changes with Apache 1.3.4 + *) Add a 'RemoveHandler' directive which will selectively remove + all handler associations for the specified file extensions. + [Ryan Bloom [EMAIL PROTECTED]] PR#1799. + *) Properly handle allow nul and .*/null in AccessConfig and ResourceConfig directives on Win32. Also add a note to the effect of 'useless User directive ignored on Win32' to the errorlog if 1.45 +34 -1 apache-1.3/src/modules/standard/mod_mime.c Index: mod_mime.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- mod_mime.c1998/07/08 17:47:17 1.44 +++ mod_mime.c1998/10/23 19:28:53 1.45 @@ -68,11 +68,16 @@ #include http_config.h #include http_log.h +typedef struct handlers_info { +char *name; +} handlers_info; + typedef struct { table *forced_types;/* Additional AddTyped stuff */ table *encoding_types; /* Added with AddEncoding... */ table *language_types; /* Added with AddLanguage... */ table *handlers;/* Added with AddHandler... */ +array_header *handlers_remove; /* List of handlers to remove */ char *type; /* Type forced with ForceType */ char *handler; /* Handler forced with SetHandler */ @@ -89,6 +94,7 @@ new-encoding_types = ap_make_table(p, 4); new-language_types = ap_make_table(p, 4); new-handlers = ap_make_table(p, 4); +new-handlers_remove = ap_make_array(p, 4, sizeof(handlers_info)); new-type = NULL; new-handler = NULL; @@ -101,7 +107,14 @@ mime_dir_config *base = (mime_dir_config *) basev; mime_dir_config *add = (mime_dir_config *) addv; mime_dir_config *new = -(mime_dir_config *) ap_palloc(p, sizeof(mime_dir_config)); + (mime_dir_config *) ap_palloc(p, sizeof(mime_dir_config)); +int i; +handlers_info *hand; + +hand = (handlers_info *) add-handlers_remove-elts; +for (i = 0; i add-handlers_remove-nelts; i++) { + ap_table_unset(base-handlers, hand[i].name); +} new-forced_types = ap_overlay_tables(p, add-forced_types, base-forced_types); @@ -158,6 +171,24 @@ return NULL; } +/* + * Note handler names that should be un-added for this location. This + * will keep the association from being inherited, as well, but not + * from being re-added at a subordinate level. + */ +static const char *remove_handler(cmd_parms *cmd, void *m, char *ext) +{ +mime_dir_config *mcfg = (mime_dir_config *) m; +handlers_info *hand; + +if (*ext == '.') { + ++ext; +} +hand = (handlers_info *) ap_push_array(mcfg-handlers_remove); +hand-name = ap_pstrdup(cmd-pool, ext); +return NULL; +} + /* The sole bit of server configuration that the MIME module has is * the name of its config file,