Skip to content

Commit ff78839

Browse files
author
Sebastiano Merlino
committed
Avoid to calculate the size of querystring for each request
Check non-emptiness using the first string char instead of calculating the size
1 parent 85400fa commit ff78839

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ size_t unescaper_func(void * cls, struct MHD_Connection *c, char *s)
779779

780780
size_t internal_unescaper(void* cls, char* s)
781781
{
782-
if(strlen(s) == 0) return 0;
782+
if(s[0] == 0) return 0;
783783

784784
webserver* dws = static_cast<webserver*>(cls);
785785
if(dws->unescaper != 0x0)

0 commit comments

Comments
 (0)