]> Nishi Git Mirror - libw3.git/commitdiff
httpd
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Sat, 17 Feb 2024 02:29:25 +0000 (02:29 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Sat, 17 Feb 2024 02:29:25 +0000 (02:29 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@236 d27a3e52-49c5-7645-884c-6793ebffc270

Example/httpd/httpd.c
W3Version.h.m4

index 131ee29b6755873ac3e1952e5b68881355d2b5e5..33167e7f00d7607b78cd890cfd0f689dd0bfc39c 100644 (file)
@@ -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);
index 0e0de23b816cfd343d068067fa1ffcce2a75265a..9b438e015a6d8445d293998a110f9326f386f0be 100644 (file)
@@ -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', `')