cvs commit: apachen/src/main http_core.c

1997-11-22 Thread dgaudet
dgaudet 97/11/21 17:59:58

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  Fix the mmap_handler error messages again.
  
  Submitted by: Ben Hyde
  Reviewed by:  Dean Gaudet, Randy Terbush, Martin Kraemer
  
  Revision  ChangesPath
  1.517 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.516
  retrieving revision 1.517
  diff -u -r1.516 -r1.517
  --- CHANGES   1997/11/20 00:42:32 1.516
  +++ CHANGES   1997/11/22 01:59:54 1.517
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b4
   
  +  *) Fix the spurious (0)unknown error: mmap_handler: mmap failed
  + error messages. [Ben Hyde]
  +
   Changes with Apache 1.3b3
   
 *) WIN32: Work around brain-damaged spawn calls that can't deal
  
  
  
  1.141 +5 -6  apachen/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- http_core.c   1997/11/15 00:16:50 1.140
  +++ http_core.c   1997/11/22 01:59:57 1.141
  @@ -1864,21 +1864,20 @@
   block_alarms();
   if ((r-finfo.st_size = MMAP_THRESHOLD)
 ( !r-header_only || (d-content_md5  1))) {
  -  /* we need to protect ourselves in case we die while we've got the
  + /* we need to protect ourselves in case we die while we've got the
 * file mmapped */
mm = mmap (NULL, r-finfo.st_size, PROT_READ, MAP_PRIVATE,
fileno(f), 0);
  + if (mm == (caddr_t)-1) {
  + aplog_error(APLOG_MARK, APLOG_CRIT, r-server,
  + default_handler: mmap failed: %s, r-filename);
  + }
   } else {
mm = (caddr_t)-1;
   }
   
   if (mm == (caddr_t)-1) {
unblock_alarms();
  -
  - if (r-finfo.st_size = MMAP_THRESHOLD) {
  - aplog_error(APLOG_MARK, APLOG_CRIT, r-server,
  - mmap_handler: mmap failed: %s, r-filename);
  - }
   #endif
   
if (d-content_md5  1) {
  
  
  


cvs commit: apache/src http_request.c

1997-11-22 Thread dgaudet
dgaudet 97/11/22 14:24:53

  Modified:src  Tag: APACHE_1_2_X http_request.c
  Log:
  Comment was a little bit inaccurate.  Also explicitly mention 2068 S9,
  S14.23 in the error message so that maybe we can avoid more and more
  people complaining about us rejecting HTTP/1.1 requests without a Host:
  header.
  
  PR: 1454
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.50.2.8  +5 -2  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.50.2.7
  retrieving revision 1.50.2.8
  diff -u -r1.50.2.7 -r1.50.2.8
  --- http_request.c1997/08/11 14:20:03 1.50.2.7
  +++ http_request.c1997/11/22 22:24:52 1.50.2.8
  @@ -906,9 +906,12 @@
((r-proto_num == 1001)  !table_get(r-headers_in, Host))) {
   /* Client sent us a HTTP/1.1 or later request without telling
 * us the hostname, either with a full URL or a Host: header.
  -  * We therefore need to (as per the 1.1 spec) send an error
  +  * We therefore need to (as per the 1.1 spec) send an error.
  +  * As a special case, HTTP/1.1 mentions twice (S9, S14.23)
  +  * that a request MUST contain a Host: header, and the server
  +  * MUST respond with 400 if it doesn't.
 */
  -log_reason (client sent HTTP/1.1 request without hostname,
  +log_reason (client sent HTTP/1.1 request without hostname (see 
RFC2068 sections 9 and 14.23),
r-uri, r);
die (BAD_REQUEST, r);
return;