From cacac3695f4247714145dc8bf9200e3536d8f0eb Mon Sep 17 00:00:00 2001 From: nishi Date: Sat, 17 Feb 2024 02:29:25 +0000 Subject: [PATCH] httpd git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@236 d27a3e52-49c5-7645-884c-6793ebffc270 --- Example/httpd/httpd.c | 6 +++++- W3Version.h.m4 | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) 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', `') -- 2.43.0