ben         96/10/19 10:02:17

  Modified:    src       http_protocol.c
  Log:
  An illegal response code caused Apache to dump core. Fixed.
  
  Revision  Changes    Path
  1.58      +4 -10     apache/src/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_protocol.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -C3 -r1.57 -r1.58
  *** http_protocol.c   1996/10/16 23:24:33     1.57
  --- http_protocol.c   1996/10/19 17:02:16     1.58
  ***************
  *** 50,56 ****
     *
     */
      
  ! /* $Id: http_protocol.c,v 1.57 1996/10/16 23:24:33 fielding Exp $ */
    
    /*
     * http_protocol.c --- routines which directly communicate with the
  --- 50,56 ----
     *
     */
      
  ! /* $Id: http_protocol.c,v 1.58 1996/10/19 17:02:16 ben Exp $ */
    
    /*
     * http_protocol.c --- routines which directly communicate with the
  ***************
  *** 856,862 ****
        int i, pos;
    
        if (status < 100)          /* Below 100 is illegal for HTTP status */
  !         return -1;
    
        for (i = 0; i < 5; i++) {
            status -= 100;
  --- 856,862 ----
        int i, pos;
    
        if (status < 100)          /* Below 100 is illegal for HTTP status */
  !         return LEVEL_500;
    
        for (i = 0; i < 5; i++) {
            status -= 100;
  ***************
  *** 865,874 ****
                if (pos < shortcut[i+1])
                    return pos;
                else
  !                 return -1;     /* status unknown (falls in gap) */
            }
        }
  !    return -1;                  /* 600 or above is also illegal */
    }
    
    
  --- 865,874 ----
                if (pos < shortcut[i+1])
                    return pos;
                else
  !                 return LEVEL_500;     /* status unknown (falls in gap) */
            }
        }
  !    return LEVEL_500;                  /* 600 or above is also illegal */
    }
    
    
  ***************
  *** 1305,1316 ****
        char *location = table_get (r->headers_out, "Location");
        int status = r->status;
        int idx = index_of_response (status);
  - 
  -     /* If status code not found, use code 500.  */
  -     if (idx == -1) {
  -         status = HTTP_INTERNAL_SERVER_ERROR;
  -         idx = index_of_response(HTTP_INTERNAL_SERVER_ERROR);
  -     }
    
        if (!r->assbackwards) {
        int i;
  --- 1305,1310 ----
  
  
  

Reply via email to