From: nishi Date: Sat, 17 Feb 2024 02:29:25 +0000 (+0000) Subject: httpd X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=cacac3695f4247714145dc8bf9200e3536d8f0eb;p=libw3.git httpd git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@236 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Example/httpd/httpd.c b/Example/httpd/httpd.c index 131ee29..33167e7 100644 --- a/Example/httpd/httpd.c +++ b/Example/httpd/httpd.c @@ -92,7 +92,7 @@ void http_handler(int sock){ line = malloc(1); line[0] = 0; if(phase == 4){ - if(strcmp(method, "GET") == 0) goto quit; + if(strcmp(method, "GET") == 0) goto response; } }else if(buf[i] != '\r'){ cbuf[0] = buf[i]; @@ -104,6 +104,10 @@ void http_handler(int sock){ } } } +response: + { + /* Using goto is not a good idea! but it works. */ + } quit:; free(line); free(method); diff --git a/W3Version.h.m4 b/W3Version.h.m4 index 0e0de23..9b438e0 100644 --- a/W3Version.h.m4 +++ b/W3Version.h.m4 @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "2.16A" \ +#define LIBW3_VERSION "2.16B" \ SUFFIX ifdef(`HTTP_SUPPORT', `#define LIBW3_HTTP_SUPPORT', `')