]> git.kaiwu.me - nginx.git/commitdiff
nginx-0.0.1-2004-01-19-00:09:21 import
authorIgor Sysoev <igor@sysoev.ru>
Sun, 18 Jan 2004 21:09:21 +0000 (21:09 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 18 Jan 2004 21:09:21 +0000 (21:09 +0000)
src/core/ngx_log.c
src/http/ngx_http_request.c
src/http/ngx_http_request.h

index 12c59f50af553ed1ed5480d7995a67469dd56725..5e3df22785027055383f08f1dc22228444e1618f 100644 (file)
@@ -1,15 +1,4 @@
 
-/*
-   TODO: log pid and tid
-*/
-
-/*
-   "[time as ctime()] [alert] 412#3 (32)Broken pipe: anything"
-
-   "[time as ctime()] [alert] (32)Broken pipe: anything"
-   "[time as ctime()] [alert] anything"
-*/
-
 #include <ngx_config.h>
 #include <ngx_core.h>
 
@@ -87,7 +76,7 @@ void ngx_log_error_core(int level, ngx_log_t *log, ngx_err_t err,
 
     /* pid#tid */
     len += ngx_snprintf(errstr + len, sizeof(errstr) - len - 1,
-                        PID_T_FMT "#%d: ", ngx_getpid(), 0);
+                        PID_T_FMT "#%d: ", ngx_getpid(), /* STUB */ 0);
 
     if (log->data) {
         len += ngx_snprintf(errstr + len, sizeof(errstr) - len - 1,
index f685bf34863874ee3217b9561c141f7fdf312854..256a41aaeee82189efc1d0c4761da10ed44677b8 100644 (file)
@@ -391,7 +391,7 @@ static void ngx_http_process_request_line(ngx_event_t *rev)
 
            /*
             * if the large client headers are enabled then
-            * we need to copy a request line
+            * we need to copy the request line
             */
 
             r->request_line.data = ngx_palloc(r->pool, r->request_line.len + 1);
@@ -493,8 +493,10 @@ static void ngx_http_process_request_line(ngx_event_t *rev)
         r->request_line.len = p - r->request_start;
         r->request_line.data = r->request_start;
 
-        ngx_http_client_error(r, rc, NGX_HTTP_BAD_REQUEST);
-
+        ngx_http_client_error(r, rc,
+                              (rc == NGX_HTTP_PARSE_INVALID_METHOD) ?
+                                     NGX_HTTP_NOT_IMPLEMENTED:
+                                     NGX_HTTP_BAD_REQUEST);
         return;
     }
 
@@ -1179,7 +1181,7 @@ static void ngx_http_set_keepalive(ngx_http_request_t *r)
         /*
          * Pipelined request.
          *
-         * We do not know here whether a pipelined request is complete
+         * We do not know here whether the pipelined request is complete
          * so if the large client headers are not enabled
          * we need to copy the data to the start of c->buffer.
          * This copy should be rare because clients that support
index 5b396b11c1f3bd0ffa8b99dd790eb7fe5c814acd..657a098cfae04d23d94748c7afc003684abaaad0 100644 (file)
 #define NGX_HTTP_RANGE_NOT_SATISFIABLE     416
 
 /*
- * HTTP does not define a code for the case when a client closed a connection
- * while we are processing request so we introduce own code to log such
- * situation when client has closed a connection before we even try to
- * send HTTP header to it
+ * HTTP does not define the code for the case when a client closed
+ * the connection while we are processing its request so we introduce
+ * own code to log such situation when a client has closed the connection
+ * before we even try to send the HTTP header to it
  */
 #define NGX_HTTP_CLIENT_CLOSED_REQUEST     499