cvs commit: apache/src CHANGES http_core.c http_protocol.c http_protocol.h http_request.c http_config.h
fielding97/07/19 13:27:56 Modified:src CHANGES http_core.c http_protocol.c http_protocol.h http_request.c http_config.h Log: In HTTP/1.1, whether or not a request message contains a body is independent of the request method and based solely on the presence of a Content-Length or Transfer-Encoding. Therefore, our default handlers need to be prepared to read a body even if they don't know what to do with it; otherwise, the body would be mistaken for the next request on a persistent connection. discard_request_body() has been added to the API to make this easier for modules. PR: 378 Reviewed by: Dean Gaudet Revision ChangesPath 1.352 +8 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.351 retrieving revision 1.352 diff -C3 -r1.351 -r1.352 *** CHANGES 1997/07/19 19:42:17 1.351 --- CHANGES 1997/07/19 20:27:50 1.352 *** *** 177,182 --- 177,190 Changes with Apache 1.2.2 + *) API: In HTTP/1.1, whether or not a request message contains a body + is independent of the request method and based solely on the presence + of a Content-Length or Transfer-Encoding. Therefore, our default + handlers need to be prepared to read a body even if they don't know + what to do with it; otherwise, the body would be mistaken for the + next request on a persistent connection. discard_request_body() + has been added to take care of that. [Roy Fielding] PR#378 + *) API: Symbol APACHE_RELEASE provides a numeric form of the Apache release version number, such that it always increases along the same lines as our source code branching. [Roy Fielding] 1.98 +7 -2 apache/src/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.97 retrieving revision 1.98 diff -C3 -r1.97 -r1.98 *** http_core.c 1997/07/17 22:27:29 1.97 --- http_core.c 1997/07/19 20:27:51 1.98 *** *** 1368,1376 (core_dir_config *)get_module_config(r->per_dir_config, &core_module); int rangestatus, errstatus; FILE *f; ! r->allowed |= (1 << M_GET); - r->allowed |= (1 << M_TRACE); r->allowed |= (1 << M_OPTIONS); if (r->method_number == M_INVALID) { --- 1368,1381 (core_dir_config *)get_module_config(r->per_dir_config, &core_module); int rangestatus, errstatus; FILE *f; ! ! /* This handler has no use for a request body (yet), but we still ! * need to read and discard it if the client sent one. ! */ ! if ((errstatus = discard_request_body(r)) != OK) ! return errstatus; ! r->allowed |= (1 << M_GET); r->allowed |= (1 << M_OPTIONS); if (r->method_number == M_INVALID) { 1.143 +53 -19apache/src/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache/src/http_protocol.c,v retrieving revision 1.142 retrieving revision 1.143 diff -C3 -r1.142 -r1.143 *** http_protocol.c 1997/07/19 10:20:50 1.142 --- http_protocol.c 1997/07/19 20:27:52 1.143 *** *** 1094,1127 bputs("\015\012", client);/* Send the terminating empty line */ } static char *make_allow(request_rec *r) { ! int allowed = r->allowed; ! ! if( allowed == 0 ) { ! /* RFC2068 #14.7, Allow must contain at least one method. So rather ! * than deal with the possibility of trying not to emit an Allow: ! * header, i.e. #10.4.6 says 405 Method Not Allowed MUST include ! * an Allow header, we'll just say TRACE is valid. ! */ ! return( "TRACE" ); ! } ! ! return 2 + pstrcat(r->pool, (allowed & (1 << M_GET)) ? ", GET, HEAD" : "", !(allowed & (1 << M_POST)) ? ", POST" : "", !(allowed & (1 << M_PUT)) ? ", PUT" : "", !(allowed & (1 << M_DELETE)) ? ", DELETE" : "", !(allowed & (1 << M_OPTIONS)) ? ", OPTIONS" : "", !(allowed & (1 << M_TRACE)) ? ", TRACE" : "", !NULL); ! } int send_http_trace (request_rec *r) { /* Get the original request */ while (r->prev) r = r->prev; hard_timeout("send TRACE", r); r->content_type = "message/http"; --- 1094,1124 bputs("\015\012", client);/* Send the terminating empty line */ } + /* Build the Allow field-value from the reque
cvs commit: apache/src CHANGES http_core.c http_protocol.c http_protocol.h http_request.c
fielding97/07/19 13:17:45 Modified:src Tag: APACHE_1_2_X CHANGES http_core.c http_protocol.c http_protocol.h http_request.c Log: In HTTP/1.1, whether or not a request message contains a body is independent of the request method and based solely on the presence of a Content-Length or Transfer-Encoding. Therefore, our default handlers need to be prepared to read a body even if they don't know what to do with it; otherwise, the body would be mistaken for the next request on a persistent connection. discard_request_body() has been added to take care of that. PR: 378 Reviewed by: Dean Gaudet Revision ChangesPath No revision No revision 1.286.2.28 +8 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.286.2.27 retrieving revision 1.286.2.28 diff -C3 -r1.286.2.27 -r1.286.2.28 *** CHANGES 1997/07/19 19:13:56 1.286.2.27 --- CHANGES 1997/07/19 20:17:38 1.286.2.28 *** *** 1,5 --- 1,13 Changes with Apache 1.2.2 + *) API: In HTTP/1.1, whether or not a request message contains a body + is independent of the request method and based solely on the presence + of a Content-Length or Transfer-Encoding. Therefore, our default + handlers need to be prepared to read a body even if they don't know + what to do with it; otherwise, the body would be mistaken for the + next request on a persistent connection. discard_request_body() + has been added to take care of that. [Roy Fielding] PR#378 + *) API: Symbol APACHE_RELEASE provides a numeric form of the Apache release version number, such that it always increases along the same lines as our source code branching. [Roy Fielding] 1.81.2.5 +7 -2 apache/src/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.81.2.4 retrieving revision 1.81.2.5 diff -C3 -r1.81.2.4 -r1.81.2.5 *** http_core.c 1997/07/05 17:56:49 1.81.2.4 --- http_core.c 1997/07/19 20:17:39 1.81.2.5 *** *** 1324,1332 (core_dir_config *)get_module_config(r->per_dir_config, &core_module); int rangestatus, errstatus; FILE *f; ! r->allowed |= (1 << M_GET); - r->allowed |= (1 << M_TRACE); r->allowed |= (1 << M_OPTIONS); if (r->method_number == M_INVALID) { --- 1324,1337 (core_dir_config *)get_module_config(r->per_dir_config, &core_module); int rangestatus, errstatus; FILE *f; ! ! /* This handler has no use for a request body (yet), but we still ! * need to read and discard it if the client sent one. ! */ ! if ((errstatus = discard_request_body(r)) != OK) ! return errstatus; ! r->allowed |= (1 << M_GET); r->allowed |= (1 << M_OPTIONS); if (r->method_number == M_INVALID) { 1.126.2.3 +53 -19apache/src/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache/src/http_protocol.c,v retrieving revision 1.126.2.2 retrieving revision 1.126.2.3 diff -C3 -r1.126.2.2 -r1.126.2.3 *** http_protocol.c 1997/07/01 06:50:29 1.126.2.2 --- http_protocol.c 1997/07/19 20:17:40 1.126.2.3 *** *** 1087,1120 bputs("\015\012", client);/* Send the terminating empty line */ } static char *make_allow(request_rec *r) { ! int allowed = r->allowed; ! ! if( allowed == 0 ) { ! /* RFC2068 #14.7, Allow must contain at least one method. So rather ! * than deal with the possibility of trying not to emit an Allow: ! * header, i.e. #10.4.6 says 405 Method Not Allowed MUST include ! * an Allow header, we'll just say TRACE is valid. ! */ ! return( "TRACE" ); ! } ! ! return 2 + pstrcat(r->pool, (allowed & (1 << M_GET)) ? ", GET, HEAD" : "", !(allowed & (1 << M_POST)) ? ", POST" : "", !(allowed & (1 << M_PUT)) ? ", PUT" : "", !(allowed & (1 << M_DELETE)) ? ", DELETE" : "", !(allowed & (1 << M_OPTIONS)) ? ", OPTIONS" : "", !(allowed & (1 << M_TRACE)) ? ", TRACE" : "", !NULL); ! } int send_http_trace (request_rec *r) { /* Get the original request */ while (r->prev) r = r->prev; hard_timeout("send TRACE", r); r->content_type = "message/http"; --- 1087,1117 bp
cvs commit: apache/src CHANGES http_core.c http_protocol.c
akosut 96/12/30 21:38:51 Modified:src CHANGES http_core.c http_protocol.c Log: Make ServerPath properly recognize path segments. Reviewed by: Randy Terbush, Chuck Murcko Revision ChangesPath 1.109 +5 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.108 retrieving revision 1.109 diff -C3 -r1.108 -r1.109 *** CHANGES 1996/12/31 02:28:59 1.108 --- CHANGES 1996/12/31 05:38:47 1.109 *** *** 1,3 --- 1,8 + Changes with Apache 1.2b5 + + *) Fix bug with ServerPath that could cause certaub files to be not + found by the server. [Alexei Kosut] + Changes with Apache 1.2b4: *) Fix possible race condition in accept_mutex_init() that 1.55 +4 -1 apache/src/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.54 retrieving revision 1.55 diff -C3 -r1.54 -r1.55 *** http_core.c 1996/12/28 00:04:49 1.54 --- http_core.c 1996/12/31 05:38:48 1.55 *** *** 1223,1229 if ((r->uri[0] != '/') && strcmp(r->uri, "*")) return BAD_REQUEST; if (r->server->path && ! !strncmp(r->uri, r->server->path, r->server->pathlen)) r->filename = pstrcat (r->pool, conf->document_root, (r->uri + r->server->pathlen), NULL); else --- 1223,1232 if ((r->uri[0] != '/') && strcmp(r->uri, "*")) return BAD_REQUEST; if (r->server->path && ! !strncmp(r->uri, r->server->path, r->server->pathlen) && ! (r->server->path[r->server->pathlen - 1] == '/' || ! r->uri[r->server->pathlen] == '/' || ! r->uri[r->server->pathlen] == '\0')) r->filename = pstrcat (r->pool, conf->document_root, (r->uri + r->server->pathlen), NULL); else 1.86 +4 -1 apache/src/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache/src/http_protocol.c,v retrieving revision 1.85 retrieving revision 1.86 diff -C3 -r1.85 -r1.86 *** http_protocol.c 1996/12/28 00:04:51 1.85 --- http_protocol.c 1996/12/31 05:38:49 1.86 *** *** 614,620 */ for (s = r->server->next; s; s = s->next) { ! if (s->path && !strncmp(r->uri, s->path, s->pathlen)) r->server = r->connection->server = s; } } --- 614,623 */ for (s = r->server->next; s; s = s->next) { ! if (s->path && !strncmp(r->uri, s->path, s->pathlen) && ! (s->path[s->pathlen - 1] == '/' || ! r->uri[s->pathlen] == '/' || ! r->uri[s->pathlen] == '\0')) r->server = r->connection->server = s; } }