src/server/daemon/httprequest.c

changeset 624
e051cb8398cf
parent 623
53b31a734cd1
child 626
c5ee5c4f8f03
--- a/src/server/daemon/httprequest.c	Mon Nov 10 21:17:52 2025 +0100
+++ b/src/server/daemon/httprequest.c	Mon Nov 10 21:23:55 2025 +0100
@@ -345,8 +345,15 @@
         request->status = 400;
         return 1;
         //pblock_kvinsert(pb_key_uri, "/", 1, rq->rq.reqpb);
+        
+        // TODO: remove this debug code
+        char tmp_file_path[128];
+        snprintf(tmp_file_path, 128, "logs/req_uri_fail_%lld", (long long int)time(NULL));
+        FILE *f = fopen(tmp_file_path, "w");
+        fwrite(request->netbuf->inbuf, 1, request->netbuf->pos, f);
+        fclose(f);
     }
-
+    
     // pass http header to the NSAPI request structure
     int hlen = request->headers->len;
     HeaderArray *ha  = request->headers;

mercurial