# HG changeset patch # User Olaf Wintermann # Date 1685530184 -7200 # Node ID 855a915472fffa0efa0d71edebb9499a8676412d # Parent f7f624cfe80a76402d5d0328de128d56719d6798 don't add empty query to rq->reqpb diff -r f7f624cfe80a -r 855a915472ff src/server/daemon/httprequest.c --- a/src/server/daemon/httprequest.c Wed May 31 12:43:30 2023 +0200 +++ b/src/server/daemon/httprequest.c Wed May 31 12:49:44 2023 +0200 @@ -252,11 +252,12 @@ return 1; } - cxmutstr query; - query.length = 0; - for(int i=0;iuri.length;i++) { if(request->uri.ptr[i] == '?') { + cxmutstr query; + query.ptr = NULL; + query.length = 0; + /* split uri in path and query */ if(absPath.length > i + 2) { query.length = absPath.length - i - 1; @@ -265,11 +266,13 @@ absPath.length = i; // Pass any query as 'query' in reqpb - pblock_kvinsert( + if(query.length > 0) { + pblock_kvinsert( pb_key_query, query.ptr, query.length, rq->rq.reqpb); + } break; }