From f385b1976e911f5911fcc1b1af11c774e3605771 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Fri, 30 Jan 2004 09:27:27 +0000
Subject: [PATCH] when we receive a request overflow, we still dump the
 incoming request to the dump file to make it easier to understand and debug
 the situation

---
 tests/server/sws.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/server/sws.c b/tests/server/sws.c
index a23cd9f42a..796806e7fd 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -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;
-- 
GitLab