]> granicus.if.org Git - curl/commitdiff
when we receive a request overflow, we still dump the incoming request to
authorDaniel Stenberg <daniel@haxx.se>
Fri, 30 Jan 2004 09:27:27 +0000 (09:27 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 30 Jan 2004 09:27:27 +0000 (09:27 +0000)
the dump file to make it easier to understand and debug the situation

tests/server/sws.c

index a23cd9f42a4796194c9f54754ad04be535b6cf06..796806e7fdcbd945ebf478069295514bc0bfcc9e 100644 (file)
@@ -262,6 +262,10 @@ static int get_request(int sock, int *part, int *open)
 
   if (offset >= REQBUFSIZ) {
     logmsg("Request buffer overflow, closing connection");
+    /* dump the request to an external file anyway */
+    reqbuf[REQBUFSIZ-1]=0;
+    storerequest(reqbuf);
+
     return DOCNUMBER_INTERNAL;
   }
   reqbuf[offset]=0;