Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id JAA12789; Tue, 29 Jul 1997 09:28:29 -0700 (PDT) Received: from colin.muc.de (root@colin.muc.de [193.174.4.1]) by hyperreal.org (8.8.5/8.8.5) with SMTP id JAA12355 for ; Tue, 29 Jul 1997 09:28:03 -0700 (PDT) Received: from en by colin.muc.de with UUCP id <86097-1>; Tue, 29 Jul 1997 18:27:51 +0200 Received: by en1.engelschall.com (Sendmail 8.8.2) for new-httpd@hyperreal.org id SAA14257; Tue, 29 Jul 1997 18:26:40 +0200 (MET DST) Message-Id: <199707291626.SAA14257@en1.engelschall.com> Subject: [STATUS] Apache 1.2.2 (Tue 29-Jul-1997 18:26 MET DST) To: new-httpd@hyperreal.org Date: Tue, 29 Jul 1997 18:26:39 +0200 From: rse@engelschall.com (Ralf S. Engelschall) Organization: Engelschall, Germany. X-Home: http://www.engelschall.com/ X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM870193599-14231-0_ Content-Transfer-Encoding: 7bit Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org --ELM870193599-14231-0_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit STATUS for Apache 1.2.2 ======================= Patches already committed: (see ``src/CHANGES'' file for more details) o PR#813,814: obscure proxy stuff (case on Host:, etc.) o PR#797: fix mod_include logging a little... o PR#832: solaris -HUP problem with slack fd o PR#378 part 1: Fix handling of request body in core o API Symbol APACHE_RELEASE provides numeric form o PR#094: revisited Patches available: (see appended MIME-part ``patches.txt'' for diff snippets) o [patch.pr848] Marc's patch for PR#848: treat container like other containers in mod_info. (already in 1.3) Status: Dean +1, RSE +1 o [patch.pr815] Kenichi Hori 's patch for PR#815: get_client_block() returns wrong length if policy is REQUEST_CHUNKED_DECHUNK (already in 1.3) Status: Dean +1, RSE +1 o [patch.pr875] Dean's MSIE 4.0 PR2 workaround for PR#875: "force-response-1.0" now only applies to requests which are HTTP/1.0 to begin with. "nokeepalive" now works for HTTP/1.1 clients. Added "downgrade-1.0" which causes Apache to pretend it received a 1.0. mod_browser now triggers during translate_name to workaround a deficiency in the header_parse phase. (already in 1.3) Status: Dean +1, Roy +1, RSE +1 o [patch.pr868] Dean's patch for PR#421, PR#868: mod_auth_anon logs multiple times (already in 1.3) Status: Dean +1, RSE +1 o [patch.pr748] Dean's patch for PR#748: mod_imap infinite loop for references above the server root Status: RSE +0, ** NEEDS TESTING ** o [patch.modrewrite] RSE's totally new patch to bring mod_rewrite up to date for Apache 1.2.2: I've collected and reconstructed all bugfixes we already have in 1.3 to be workable with the 1.2 sources. Actually the resulting version is the one from 1.3 minus NT stuff, minus the 64Bit-casting stuff, minus new API hooks, etc. (already in 1.3) Status: RSE +1 o [patch.modinclude] Howard Fear's patch to cleanup mod_include: handle_else was being used to handle endif. It didn't cause problems, but it was cleaned up too. (already in 1.3) Status: RSE +1 o [patch.solarisdup] Dean's patch for the solaris which superseeds "PR#832: solaris -HUP problem with slack fd" Status: Dean +1, RSE +0 o [patch.chunkerr] Dean's "[PATCH] 1.2.2: obscure chunking error": While chunking, it is possible to exit bwrite() or bflush() without having started the next chunk. It should only happen when there's a write error ... but in some cases it would return without setting the error flags. Status: Dean +1, RSE +0 ** NEEDS TESTING ** Ralf S. Engelschall rse@engelschall.com www.engelschall.com --ELM870193599-14231-0_ Content-Type: text/plain Content-Disposition: attachment; filename=patches.txt Content-Description: patches.txt Content-Transfer-Encoding: 7bit ====[patch.chunkerr]============================================ |From: dgaudet@arctic.org (Dean Gaudet) |Subject: [PATCH] 1.2.2: obscure chunking error |Date: 29 Jul 1997 15:27:43 +0200 |Message-ID: Ok I think these are obscure. While chunking, it is possible to exit bwrite() or bflush() without having started the next chunk. It should only happen when there's a write error ... but in some cases it would return without setting the error flags. This patch, already committed to 1.3 as part of my writev combining patch, is for 1.2.2. Um I know that the number of people who grok buff.c well enough to figure out if this is right are limited. If someone could apply it to a server and then try a bunch of CGI/SSI access from a 1.1 client (such as MSIE 4.0pr2, without java so that you don't have to downgrade-1.0 force-response-1.0 it) I'd appreciate it. I slept on it a few days and it still seems to be the right fix. Or point a libwww-5.1 spider at it. Those are the only 1.1 clients I know of. Dean Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.286.2.31 diff -u -r1.286.2.31 CHANGES --- CHANGES 1997/07/20 18:39:42 1.286.2.31 +++ CHANGES 1997/07/29 07:02:56 @@ -1,5 +1,8 @@ Changes with Apache 1.2.2 - + + *) In some obscure cases involving partially failed writes while doing + HTTP/1.1 chunking apache would omit the chunk header. [Dean Gaudet] + *) The proxy didn't treat the "Host:" keyword of the host header as case- insensitive. The proxy would corrupt the first line of a response from an HTTP/0.9 server. [Kenichi Hori ] PR#813,814 Index: buff.c =================================================================== RCS file: /export/home/cvs/apache/src/buff.c,v retrieving revision 1.26 diff -u -r1.26 buff.c --- buff.c 1997/05/29 05:21:15 1.26 +++ buff.c 1997/07/29 07:02:58 @@ -750,6 +750,9 @@ return i; } + /* in case a chunk hasn't been started yet */ + if( fb->flags & B_CHUNK ) start_chunk( fb ); + /* * Whilst there is data in the buffer, keep on adding to it and writing it * out @@ -776,13 +779,17 @@ /* it is just too painful to try to re-cram the buffer while * chunking */ - i = (write_it_all(fb, fb->outbase, fb->outcnt) == -1) ? - -1 : fb->outcnt; - } - else { - do i = write(fb->fd, fb->outbase, fb->outcnt); - while (i == -1 && errno == EINTR && !(fb->flags & B_EOUT)); + if (write_it_all(fb, fb->outbase, fb->outcnt) == -1) { + /* we cannot continue after a chunked error */ + doerror (fb, B_WR); + return -1; + } + fb->outcnt = 0; + break; } + do { + i = write(fb->fd, fb->outbase, fb->outcnt); + } while (i == -1 && errno == EINTR && !(fb->flags & B_EOUT)); if (i <= 0) { if (i == 0) /* return of 0 means non-blocking */ errno = EAGAIN; @@ -861,7 +868,6 @@ while (fb->outcnt > 0) { - /* the buffer must be full */ do i = write(fb->fd, fb->outbase, fb->outcnt); while (i == -1 && errno == EINTR && !(fb->flags & B_EOUT)); if (i == 0) { ====[patch.modinclude]============================================ |From: dgaudet@hyperreal.org (Dean Gaudet) |Subject: cvs commit: apache/src CHANGES mod_include.c |Date: 28 Jul 1997 15:10:26 +0200 |Message-ID: <199707280846.BAA01417@hyperreal.org> dgaudet 97/07/28 01:46:45 Modified: src CHANGES mod_include.c Log: fixed unused handle_endif Submitted by: Howard Fear Reviewed by: Dean Gaudet, Marc Slemko Revision Changes Path 1.369 +4 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.368 retrieving revision 1.369 diff -u -r1.368 -r1.369 --- CHANGES 1997/07/27 02:38:03 1.368 +++ CHANGES 1997/07/28 08:46:41 1.369 @@ -1,5 +1,9 @@ Changes with Apache 1.3a2 + *) mod_include cleanup showed that handle_else was being used to handle + endif. It didn't cause problems, but it was cleaned up too. + [Howard Fear] + *) mod_cern_meta would attempt to find meta files for the directory itself in some cases, but not in others. It now avoids it in all cases. [Dean Gaudet] 1.45 +2 -2 apache/src/mod_include.c Index: mod_include.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_include.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- mod_include.c 1997/07/27 01:43:26 1.44 +++ mod_include.c 1997/07/28 08:46:42 1.45 @@ -1728,6 +1728,7 @@ #ifdef DEBUG_INCLUDE rvputs(r, "**** endif conditional_status=\"", *conditional_status ? "1" : "0", "\"\n", NULL); #endif + *printing = 1; *conditional_status = 1; return 0; } else { @@ -1843,8 +1844,7 @@ continue; } else if (!strcmp(directive, "endif")) { if (!if_nesting) { - ret = handle_else(f, r, error, &conditional_status, &printing); - printing = 1; + ret = handle_endif(f, r, error, &conditional_status, &printing); } else { if_nesting--; } ====[patch.modrewrite]============================================ This patch incorporates mod_rewrite 3.0.9 into Apache 1.2.2 the same way we have done for 1.3-dev recently. The big difference is that only bugfixes are included and the NT/WIN32 stuff was taken out. This patch contains in detail: o added diff between mod_rewrite 3.0.6+ and 3.0.9 minus WIN32/NT stuff, but plus copyright removement. In detail: - workaround for detecting infiniteai rewriting loops - fixed setting of env vars when "-" is used as subst string - fixed forced response code on redirects (PR#777) - fixed cases where r->args is "" - kludge to disable locking on pipes under braindead SunOS - fix for rewritelog in cases where remote hostname is unknown - fixed totally damaged request_rec walk-back loop o remove static from local data and add static to global ones. o replaced ugly proxy finding stuff by simple find_linked_module("mod_proxy") call. o added missing negation char on rewritelog() o fixed a few comment typos Index: mod_rewrite.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v retrieving revision 1.28.2.1 diff -u -r1.28.2.1 mod_rewrite.c --- mod_rewrite.c 1997/06/27 02:26:30 1.28.2.1 +++ mod_rewrite.c 1997/07/29 12:22:12 @@ -52,16 +52,14 @@ */ -/* -** mod_rewrite.c -- The Main Module Code -** _ _ _ +/* _ _ _ ** _ __ ___ ___ __| | _ __ _____ ___ __(_) |_ ___ ** | '_ ` _ \ / _ \ / _` | | '__/ _ \ \ /\ / / '__| | __/ _ \ ** | | | | | | (_) | (_| | | | | __/\ V V /| | | | || __/ ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** |_____| ** -** URL Rewriting Module, Version 3.0.6 (15-Jun-1997) +** URL Rewriting Module ** ** This module uses a rule-based rewriting engine (based on a ** regular-expression parser) to rewrite requested URLs on the fly. @@ -78,12 +76,9 @@ ** can lead to internal subprocessing, external request redirection or even ** to internal proxy throughput. ** -** The documentation and latest release can be found on -** http://www.engelschall.com/sw/mod_rewrite/ -** -** Copyright (c) 1996-1997 Ralf S. Engelschall, All rights reserved. +** This module was originally written in April 1996 and +** gifted exclusively to the The Apache Group in July 1997 by ** -** Written for The Apache Group by ** Ralf S. Engelschall ** rse@engelschall.com ** www.engelschall.com @@ -219,7 +214,7 @@ }; /* the cache */ -cache *cachep; +static cache *cachep; /* whether proxy module is available or not */ static int proxy_available; @@ -1114,6 +1109,7 @@ char *prefix; int l; int n; + char *ofilename; dconf = (rewrite_perdir_conf *)get_module_config(r->per_dir_config, &rewrite_module); @@ -1147,6 +1143,13 @@ } /* + * remember the current filename before rewriting for later check + * to prevent deadlooping because of internal redirects + * on final URL/filename which can be equal to the inital one. + */ + ofilename = r->filename; + + /* * now apply the rules ... */ if (apply_rewrite_list(r, dconf->rewriterules, dconf->directory)) { @@ -1260,6 +1263,18 @@ if (r->filename[0] != '/') return BAD_REQUEST; + /* Check for deadlooping: + * At this point we KNOW that at least one rewriting + * rule was applied, but when the resulting URL is + * the same as the initial URL, we are not allowed to + * use the following internal redirection stuff because + * this would lead to a deadloop. + */ + if (strcmp(r->filename, ofilename) == 0) { + rewritelog(r, 1, "[per-dir %s] initial URL equal rewritten URL: %s [IGNORING REWRITE]", dconf->directory, r->filename); + return OK; + } + /* if there is a valid base-URL then substitute the per-dir prefix with this base-URL if the current filename still is inside this per-dir @@ -1501,8 +1516,17 @@ return 0; /* if any condition fails this complete rule fails */ /* if this is a pure matching rule we return immediately */ - if (strcmp(output, "-") == 0) + if (strcmp(output, "-") == 0) { + /* but before we set the env variables... */ + for (i = 0; p->env[i] != NULL; i++) { + strncpy(env2, p->env[i], sizeof(env2)-1); + EOS_PARANOIA(env2); + strncpy(env, pregsub(r->pool, env2, uri, regexp->re_nsub+1, regmatch), sizeof(env)-1); /* substitute in output */ + EOS_PARANOIA(env); + add_env_variable(r, env); + } return 2; + } /* if this is a forced proxy request ... */ if (p->flags & RULEFLAG_PROXY) { @@ -1535,7 +1559,7 @@ return 1; } - /* if this is a implicit redirect in a per-dir rule */ + /* if this is an implicit redirect in a per-dir rule */ i = strlen(output); if (perdir != NULL && ( (i > 7 && strncmp(output, "http://", 7) == 0) @@ -1567,10 +1591,9 @@ return 1; } - /* add the previously stripped perdir prefix - if the new URI is not a new one (i.e. - prefixed by a slash which means that is - no for this per-dir context) */ + /* add again the previously stripped perdir prefix if the new + URI is not a new one (i.e. prefixed by a slash which means + that it is not for this per-dir context) */ if (prefixstrip && output[0] != '/') { rewritelog(r, 3, "[per-dir %s] add per-dir prefix: %s -> %s%s", perdir, output, perdir, output); output = pstrcat(r->pool, perdir, output, NULL); @@ -1622,6 +1645,7 @@ and the current URL still is not a fully qualified one we finally prefix it with http[s]:// explicitly */ if (flags & RULEFLAG_FORCEREDIRECT) { + r->status = p->forced_responsecode; if ( !(strlen(r->filename) > 7 && strncmp(r->filename, "http://", 7) == 0) && !(strlen(r->filename) > 8 && @@ -1657,7 +1681,6 @@ else rewritelog(r, 2, "[per-dir %s] prepare forced redirect %s -> %s", perdir, r->filename, newuri); r->filename = pstrdup(r->pool, newuri); - r->status = p->forced_responsecode; return 1; } } @@ -1768,7 +1791,9 @@ if (p->flags & CONDFLAG_NOTMATCH) rc = !rc; - rewritelog(r, 4, "RewriteCond: input='%s' pattern='%s' => %s", input, p->pattern, rc ? "matched" : "not-matched"); + rewritelog(r, 4, "RewriteCond: input='%s' pattern='%s%s' => %s", + input, (p->flags & CONDFLAG_NOTMATCH ? "!" : ""), + p->pattern, rc ? "matched" : "not-matched"); /* end just return the result */ return rc; @@ -1806,9 +1831,15 @@ r->args = pstrcat(r->pool, q, "&", r->args, NULL); else r->args = pstrdup(r->pool, q); - if (r->args[strlen(r->args)-1] == '&') - r->args[strlen(r->args)-1] = '\0'; - rewritelog(r, 3, "split uri=%s -> uri=%s, args=%s", olduri, r->filename, r->args); + if (strlen(r->args) == 0) { + r->args = NULL; + rewritelog(r, 3, "split uri=%s -> uri=%s, args=", olduri, r->filename); + } + else { + if (r->args[strlen(r->args)-1] == '&') + r->args[strlen(r->args)-1] = '\0'; + rewritelog(r, 3, "split uri=%s -> uri=%s, args=%s", olduri, r->filename, r->args); + } } return; } @@ -2211,7 +2242,9 @@ int i; /* lock the channel */ +#ifdef USE_PIPE_LOCKING fd_lock(fpin); +#endif /* write out the request key */ write(fpin, key, strlen(key)); @@ -2227,7 +2260,9 @@ buf[i] = '\0'; /* unlock the channel */ +#ifdef USE_PIPE_LOCKING fd_unlock(fpin); +#endif if (strcasecmp(buf, "NULL") == 0) return NULL; @@ -2252,8 +2287,8 @@ rewrite_server_conf *conf; char *fname; FILE *fp; - static int rewritelog_flags = ( O_WRONLY|O_APPEND|O_CREAT ); - static mode_t rewritelog_mode = ( S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH ); + int rewritelog_flags = ( O_WRONLY|O_APPEND|O_CREAT ); + mode_t rewritelog_mode = ( S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH ); conf = get_module_config(s->module_config, &rewrite_module); @@ -2304,14 +2339,15 @@ rewrite_server_conf *conf; conn_rec *connect; char *str1; - static char str2[HUGE_STRING_LEN]; - static char str3[HUGE_STRING_LEN]; - static char type[20]; - static char redir[20]; + char str2[512]; + char str3[1024]; + char type[20]; + char redir[20]; va_list ap; int i; request_rec *req; char *ruser; + const char *rhost; va_start(ap, text); conf = get_module_config(r->server->module_config, &rewrite_module); @@ -2337,7 +2373,11 @@ ruser = "\"\""; } - str1 = pstrcat(r->pool, get_remote_host(connect, r->server->module_config, REMOTE_NAME), " ", + rhost = get_remote_host(connect, r->server->module_config, REMOTE_NAME); + if (rhost == NULL) + rhost = "UNKNOWN-HOST"; + + str1 = pstrcat(r->pool, rhost, " ", (connect->remote_logname != NULL ? connect->remote_logname : "-"), " ", ruser, NULL); ap_vsnprintf(str2, sizeof(str2), text, ap); @@ -2347,8 +2387,8 @@ else strcpy(type, "subreq"); - for (i = 0, req = r->prev; req != NULL; req = req->prev) - ; + for (i = 0, req = r; req->prev != NULL; req = req->prev) + i++; if (i == 0) redir[0] = '\0'; else @@ -3185,18 +3225,7 @@ static int is_proxy_available(server_rec *s) { - extern module *preloaded_modules[]; - command_rec *c; - int n; - - for (n = 0; preloaded_modules[n] != NULL; n++) { - for (c = preloaded_modules[n]->cmds; c && c->name; ++c) { - if (strcmp(c->name, "ProxyRequests") == 0) { - return 1; - } - } - } - return 0; + return (find_linked_module("mod_proxy") != NULL); } @@ -3278,7 +3307,7 @@ ** */ -int compare_lexicography(char *cpNum1, char *cpNum2) +static int compare_lexicography(char *cpNum1, char *cpNum2) { int i; int n1, n2; Index: mod_rewrite.h =================================================================== RCS file: /export/home/cvs/apache/src/mod_rewrite.h,v retrieving revision 1.22.2.1 diff -u -r1.22.2.1 mod_rewrite.h --- mod_rewrite.h 1997/06/27 02:26:32 1.22.2.1 +++ mod_rewrite.h 1997/07/29 12:22:16 @@ -56,7 +56,6 @@ #define _MOD_REWRITE_H 1 /* -** mod_rewrite.h -- Common Header File ** _ _ _ ** _ __ ___ ___ __| | _ __ _____ ___ __(_) |_ ___ ** | '_ ` _ \ / _ \ / _` | | '__/ _ \ \ /\ / / '__| | __/ _ \ @@ -64,7 +63,7 @@ ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** |_____| ** -** URL Rewriting Module, Version 3.0.6 (15-Jun-1997) +** URL Rewriting Module ** ** This module uses a rule-based rewriting engine (based on a ** regular-expression parser) to rewrite requested URLs on the fly. @@ -81,12 +80,9 @@ ** can lead to internal subprocessing, external request redirection or even ** to internal proxy throughput. ** -** The documentation and latest release can be found on -** http://www.engelschall.com/sw/mod_rewrite/ +** This module was originally written in April 1996 and +** gifted exclusively to the The Apache Group in July 1997 by ** -** Copyright (c) 1996-1997 Ralf S. Engelschall, All rights reserved. -** -** Written for The Apache Group by ** Ralf S. Engelschall ** rse@engelschall.com ** www.engelschall.com @@ -137,7 +133,14 @@ #include #endif - + /* The locking support for the RewriteMap programs: + Locking a pipe to the child works fine under most + Unix derivates, but braindead SunOS 4.1.x has + problems with this approach... */ +#define USE_PIPE_LOCKING 1 +#ifdef SUNOS4 +#undef USE_PIPE_LOCKING +#endif /* @@ -390,7 +393,7 @@ static void fd_unlock(int fd); /* Lexicographic Comparison */ -int compare_lexicography(char *cpNum1, char *cpNum2); +static int compare_lexicography(char *cpNum1, char *cpNum2); #endif /* _MOD_REWRITE_H */ ====[patch.pr748]============================================ |Date: Sat, 26 Jul 1997 19:46:22 -0700 (PDT) |From: Dean Gaudet |Reply-To: new-httpd@apache.org |To: new-httpd@apache.org |Subject: Re: [PATCH]: PR#748, mod_imap loop On Sun, 20 Jul 1997, Brian Behlendorf wrote: > The following fixes a bug noted in PR#748, where a reference in a mapfile > to a file above the server root will cause an infinite loop. I want one or > two sanity checks before this is implemented, but it certainly seemed to > fix the problem. I don't think that's the correct fix. The code right after that already tests the directory length. It looks like directory == NULL is a possibility too. This is how I think it should be fixed. I haven't tested this at all though. Dean Index: mod_imap.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_imap.c,v retrieving revision 1.26 diff -u -r1.26 mod_imap.c --- mod_imap.c 1997/07/27 01:43:25 1.26 +++ mod_imap.c 1997/07/27 02:45:09 @@ -475,6 +475,10 @@ } value += 2; /* jump over the '..' that we found in the value */ + } else if (directory) { + url[0] = '\0'; + log_reason("invalid directory name in map file", r->uri, r); + return; } if (! strncmp(value, "/../", 4) || ! strcmp(value, "/..") ) ====[patch.pr815]============================================ |Date: Sat, 19 Jul 1997 03:20:53 -0700 (PDT) |From: Dean Gaudet |Message-Id: <199707191020.DAA26697@hyperreal.org> |Subject: cvs commit: apache/src CHANGES http_protocol.c dgaudet 97/07/19 03:20:52 Modified: src CHANGES http_protocol.c Log: PR#815: get_client_block() returns wrong length if policy is REQUEST_CHUNKED_DECHUNK Submitted by: Kenichi Hori Reviewed by: Dean Gaudet Revision Changes Path 1.350 +4 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.349 retrieving revision 1.350 diff -C3 -r1.349 -r1.350 *** CHANGES 1997/07/19 09:48:03 1.349 --- CHANGES 1997/07/19 10:20:50 1.350 *************** *** 1,4 **** --- 1,8 ---- Changes with Apache 1.3 + + *) get_client_block() returns wrong length if policy is + REQUEST_CHUNKED_DECHUNK. + [Kenichi Hori ] PR#815 *) Support the image map format of FrontPage. For example: rect /url.hrm 10 20 30 40 1.142 +5 -1 apache/src/http_protocol.c Index: http_protocol.c =================================================================== RCS file: /export/home/cvs/apache/src/http_protocol.c,v retrieving revision 1.141 retrieving revision 1.142 diff -C3 -r1.141 -r1.142 *** http_protocol.c 1997/07/19 08:02:04 1.141 --- http_protocol.c 1997/07/19 10:20:50 1.142 *************** *** 1462,1468 **** buffer[chunk_start++] = LF; buffer += chunk_start; /* and pass line on to caller */ bufsiz -= chunk_start; ! } } /* When REQUEST_CHUNKED_PASS, we are */ if (r->remaining == -1) { /* reading footers until empty line */ --- 1462,1472 ---- buffer[chunk_start++] = LF; buffer += chunk_start; /* and pass line on to caller */ bufsiz -= chunk_start; ! } else { ! /* REQUEST_CHUNKED_DECHUNK -- do not include the length of ! * the header in the return value */ ! chunk_start = 0; ! } } /* When REQUEST_CHUNKED_PASS, we are */ if (r->remaining == -1) { /* reading footers until empty line */ ====[patch.pr848]============================================ |Date: Sat, 12 Jul 1997 12:52:16 -0700 (PDT) |From: Marc Slemko |Message-Id: <199707121952.MAA15677@hyperreal.org> |Subject: cvs commit: apache/src mod_info.c marc 97/07/12 12:52:16 Modified: src mod_info.c Log: Properly treat container like other containers in mod_info. Reviewed by: Jim Jagielski PR: 848 Revision Changes Path 1.18 +9 -4 apache/src/mod_info.c Index: mod_info.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_info.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C3 -r1.17 -r1.18 *** mod_info.c 1997/06/15 19:22:30 1.17 --- mod_info.c 1997/07/12 19:52:15 1.18 *************** *** 165,179 **** int lab=0, nest=0; while(li) { ! if(!strncasecmp(li->cmd,"cmd,"cmd,"next; nest++; continue; } else if(nest && (!strncasecmp(li->cmd,"cmd,"cmd,"",r); --- 165,183 ---- int lab=0, nest=0; while(li) { ! if(!strncasecmp(li->cmd,"cmd,"cmd,"cmd,"next; nest++; continue; } else if(nest && (!strncasecmp(li->cmd,"cmd,"cmd,"cmd,"",r); *************** *** 221,227 **** && (strncasecmp(li->cmd,"cmd,"cmd,"cmd,"cmd,"cmd,"",r); rputs(mod_info_html_cmd_string(li_st->cmd),r); rputs(" ",r); --- 225,232 ---- && (strncasecmp(li->cmd,"cmd,"cmd,"cmd,"cmd,"cmd,"cmd,"",r); rputs(mod_info_html_cmd_string(li_st->cmd),r); rputs(" ",r); ====[patch.pr868]============================================ |Message-Id: <199707152020.NAA04880@hyperreal.org> |Date: Tue, 15 Jul 1997 13:20:42 -0700 (PDT) |From: Jesus Hijazo >Number: 868 >Category: mod_auth-any >Synopsis: bad log registration of e-mail address in mod_auth_anon.c >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Tue Jul 15 13:30:02 1997 >Last-Modified: Thu Jul 17 15:01:15 PDT 1997 >Originator: jhijazo@canal-auto.es >Organization: >Release: 1.2.1 >Environment: Linux Alfa 2.0.27 >Description: I obtain 5 or 6 records (with time and e-mail) in the error_log file for each succesed hit to a restricted directory using anonymous authentification, I guess only one record is the right way. I need to do statistics for anonymous (e-mail) access, and this is a problem. >How-To-Repeat: >Fix: >Audit-Trail: From: Dean Gaudet To: Jesus Hijazo Subject: Re: mod_auth-any/868: bad log registration of e-mail address in mod_auth_anon.c Date: Thu, 17 Jul 1997 14:43:13 -0700 (PDT) Try this patch. The fix for this probably won't appear in the released code until 1.3. Dean --- mod_auth_anon.c.dist Tue Mar 18 19:12:52 1997 +++ mod_auth_anon.c Thu Jul 17 14:40:21 1997 @@ -239,7 +239,7 @@ (strpbrk(".",send_pw) != NULL)) ) ) { - if (sec->auth_anon_logemail) { + if (sec->auth_anon_logemail && r->prev == NULL && r->main == NULL) { ap_snprintf(errstr, sizeof(errstr), "Anonymous: Passwd <%s> Accepted", send_pw ? send_pw : "\'none\'"); log_error (errstr, r->server ); State-Changed-From-To: open-closed State-Changed-By: dgaudet State-Changed-When: Thu Jul 17 15:01:14 PDT 1997 State-Changed-Why: Supplied a back-ported patch. >Unformatted: ====[patch.pr875]============================================ MSIE 4.0 PR2 is the first public release of IE4 with HTTP/1.1 support. There are two bugs in the HTTP/1.1 support that we've been notified of so far: - It seems to handle keep-alive only on "200 OK" responses. The HTTP/1.1 standard indicates that all connections are keep-alive by default, and Apache behaves according to the standard. This problem typically manifests itself as a long delay after the client receives a redirect from the server. - The Java VM makes HTTP/1.1 requests but does not seem to understand HTTP/1.1 responses. In particular it does not implement chunked encoding (which is required by HTTP/1.1). An example where this would occur is a Java applet accessing a CGI on an Apache server. The response in this case is (usually) chunked. Note that neither of these will be a problem for MSIE 4.0 PR2 clients that are behind proxies -- in that case IE will downgrade its request to 1.0 in order to pass it to the proxy. The client also provides the option of disabling HTTP/1.1 support. Apache can workaround these problems. Apply the patch below and rebuild your server, then add this line to your httpd.conf file: BrowserMatch "MSIE 4\.0b2;" nokeepalive force-response-1.0 downgrade-1.0 That disables keep-alive, and causes Apache to pretend it is talking with a 1.0 client whenever it recieves a request from IE 4.0 PR2. Dean Gaudet Index: http_protocol.c =================================================================== RCS file: /export/home/cvs/apache/src/http_protocol.c,v retrieving revision 1.126.2.2 diff -u -r1.126.2.2 http_protocol.c --- http_protocol.c 1997/07/01 06:50:29 1.126.2.2 +++ http_protocol.c 1997/07/19 08:25:12 @@ -281,8 +281,9 @@ * and the response status does not require a close; * and the response generator has not already indicated close; * and the client did not request non-persistence (Connection: close); + * and we haven't been configured to ignore the buggy twit + * or they're a buggy twit coming through a HTTP/1.1 proxy * and the client is requesting an HTTP/1.0-style keep-alive - * and we haven't been configured to ignore the buggy twit, * or the client claims to be HTTP/1.1 compliant (perhaps a proxy); * THEN we can be persistent, which requires more headers be output. * @@ -304,9 +305,10 @@ !status_drops_connection(r->status) && !wimpy && !find_token(r->pool, conn, "close") && - (((ka_sent = find_token(r->pool, conn, "keep-alive")) && - !table_get(r->subprocess_env, "nokeepalive")) || - (r->proto_num >= 1001)) + (!table_get(r->subprocess_env, "nokeepalive") || + table_get(r->headers_in, "Via")) && + ((ka_sent = find_token(r->pool, conn, "keep-alive")) || + (r->proto_num >= 1001)) ) { char header[256]; int left = r->server->keep_alive_max - r->connection->keepalives; @@ -1041,8 +1043,9 @@ if (!r->status_line) r->status_line = status_lines[index_of_response(r->status)]; - - if (table_get(r->subprocess_env,"force-response-1.0")) + + if (r->proto_num == 1000 + && table_get(r->subprocess_env,"force-response-1.0")) protocol = "HTTP/1.0"; else protocol = SERVER_PROTOCOL; Index: http_request.c =================================================================== RCS file: /export/home/cvs/apache/src/http_request.c,v retrieving revision 1.50.2.3 diff -u -r1.50.2.3 http_request.c --- http_request.c 1997/07/01 06:50:30 1.50.2.3 +++ http_request.c 1997/07/19 08:25:15 @@ -935,6 +935,10 @@ return; } + if (r->proto_num > 1000 && table_get (r->subprocess_env, "downgrade-1.0")) { + r->proto_num = 1000; + } + /* NB: directory_walk() clears the per_dir_config, so we don't inherit from location_walk() above */ Index: mod_browser.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_browser.c,v retrieving revision 1.9 diff -u -r1.9 mod_browser.c --- mod_browser.c 1997/04/24 23:35:21 1.9 +++ mod_browser.c 1997/07/19 08:25:16 @@ -139,7 +139,7 @@ { NULL }, }; -int parse_headers_browser_module(request_rec *r) +static int browser_match(request_rec *r) { server_rec *s = r->server; browser_server_config_rec *sconf = get_module_config (s->module_config, @@ -166,7 +166,7 @@ } } - return OK; + return DECLINED; } module browser_module = { @@ -178,12 +178,12 @@ merge_browser_config, /* merge server configs */ browser_module_cmds, /* command table */ NULL, /* handlers */ - NULL, /* filename translation */ + browser_match, /* filename translation */ NULL, /* check_user_id */ NULL, /* check auth */ NULL, /* check access */ NULL, /* type_checker */ NULL, /* fixups */ NULL, /* logger */ - parse_headers_browser_module /* header parser */ + NULL /* header parser */ }; ====[patch.solarisdup]============================================ |From: dgaudet@arctic.org (Dean Gaudet) |Subject: [PATCH] solaris sockets |Date: 29 Jul 1997 00:19:15 +0200 |Message-ID: I think the comment in the patch speaks for itself. I'll mail this to all the PR submitters. This is against 1.2.1 without the previous patch applied. Dean [The previous patch can be seen with ``cvs diff -r1.149.2.4 -r1.149.2.5 http_main.c'' and has to be backed out from Apache 1.2.2-dev when we include this one -- rse] --- apache_1.2.1-dist/src/http_main.c Sun Jun 29 11:08:37 1997 +++ apache_1.2.1/src/http_main.c Mon Jul 28 11:35:36 1997 @@ -1982,7 +1982,27 @@ exit(1); } + /* Solaris, at least versions 2.4, 2.5 and 2.5.1, even with various + * levels of tcp/ip patches available as of July 28, 1997, completely + * botches up if you do any form of dup() on a socket. If that dupped + * socket is then put into listen() and accept()s at least one + * connection, then Bad Things happen. Things work fine until the + * socket is close()d. At that point, no matter what SO_REUSEADDR was + * set to, nothing can rebind the same address/port, you'll get + * "Address in use" errors. This takes about 5 minutes to timeout. + * + * So we do no slacking on solaris sockets. If you can live with those + * restrictions (which essentially means you have to use SIGUSR1 and + * not SIGHUP to restart the server, and should you ever need to stop + * the server you'll have at least a 5 minute wait before you can + * restart it) then you can remove this #ifndef. You'll get yourself + * another 120ish virtual hosts (assuming you're using Listen for each + * of them) before you run into another Solaris problem: the 256 + * FILE * limitation. + */ +#ifndef SOLARIS2 s = ap_slack(s, AP_SLACK_HIGH); +#endif note_cleanups_for_fd(pconf, s); /* arrange to close on exec or restart */ --ELM870193599-14231-0_--