From 3eaa68bfdafd1b19fc78d1bb1e5d067e6c868ba6 Mon Sep 17 00:00:00 2001 From: cameronrich Date: Sat, 12 Aug 2006 09:21:14 +0000 Subject: [PATCH] cgi warning fix git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@37 9a5d90b5-6617-0410-8a86-bb477d3ed2e3 --- httpd/awhttpd.patch | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/httpd/awhttpd.patch b/httpd/awhttpd.patch index 756024240..634b8b47d 100644 --- a/httpd/awhttpd.patch +++ b/httpd/awhttpd.patch @@ -1,6 +1,6 @@ diff -Naur awhttpd/aw3.h axTLS/httpd/awhttpd/aw3.h --- awhttpd/aw3.h 2005-01-23 13:17:14.000000000 +1000 -+++ axTLS/httpd/awhttpd/aw3.h 2006-08-12 18:25:58.390625000 +1000 ++++ axTLS/httpd/awhttpd/aw3.h 2006-08-12 19:16:59.687500000 +1000 @@ -7,17 +7,16 @@ */ @@ -192,7 +192,7 @@ diff -Naur awhttpd/aw3.h axTLS/httpd/awhttpd/aw3.h +void initlists(void); diff -Naur awhttpd/cgi.c axTLS/httpd/awhttpd/cgi.c --- awhttpd/cgi.c 2005-06-04 14:09:52.000000000 +1000 -+++ axTLS/httpd/awhttpd/cgi.c 2006-08-12 18:26:18.437500000 +1000 ++++ axTLS/httpd/awhttpd/cgi.c 2006-08-12 19:17:29.171875000 +1000 @@ -7,93 +7,46 @@ */ @@ -229,8 +229,8 @@ diff -Naur awhttpd/cgi.c axTLS/httpd/awhttpd/cgi.c - - return; - - } - +-} +- - - -void gensysenv(struct connstruct *cn) { @@ -266,8 +266,8 @@ diff -Naur awhttpd/cgi.c axTLS/httpd/awhttpd/cgi.c - - #endif - --} -- + } + - - void proccgi(struct connstruct *cn, int has_pathinfo) { @@ -311,7 +311,7 @@ diff -Naur awhttpd/cgi.c axTLS/httpd/awhttpd/cgi.c // Close the write descriptor close(tpipe[1]); cn->filedesc = tpipe[0]; -@@ -132,19 +86,61 @@ +@@ -132,19 +86,62 @@ close(tpipe[1]); myargs[0] = cn->actualfile; @@ -364,7 +364,7 @@ diff -Naur awhttpd/cgi.c axTLS/httpd/awhttpd/cgi.c + removeconnection(cn); + return; + } - ++ + _dup2(tmp_stdout, _fileno(stdout)); + close(tmp_stdout); + cn->filedesc = tpipe[0]; @@ -373,12 +373,13 @@ diff -Naur awhttpd/cgi.c axTLS/httpd/awhttpd/cgi.c + for (;;) + { + procreadfile(cn); -+ + + if (cn->filedesc == -1) + break; + + procsendfile(cn); + usleep(200000); /* don't know why this delay makes it work (yet) */ ++ } +#endif } +#endif /* CONFIG_HTTP_HAS_CGI */ @@ -653,7 +654,7 @@ diff -Naur awhttpd/conf.c axTLS/httpd/awhttpd/conf.c -} diff -Naur awhttpd/conn.c axTLS/httpd/awhttpd/conn.c --- awhttpd/conn.c 2004-12-07 16:11:02.000000000 +1000 -+++ axTLS/httpd/awhttpd/conn.c 2006-08-12 18:25:58.406250000 +1000 ++++ axTLS/httpd/awhttpd/conn.c 2006-08-12 19:16:59.687500000 +1000 @@ -9,26 +9,16 @@ #include @@ -760,7 +761,7 @@ diff -Naur awhttpd/conn.c axTLS/httpd/awhttpd/conn.c } diff -Naur awhttpd/errors.c axTLS/httpd/awhttpd/errors.c --- awhttpd/errors.c 2005-01-23 06:49:29.000000000 +1000 -+++ axTLS/httpd/awhttpd/errors.c 2006-08-12 18:25:58.406250000 +1000 ++++ axTLS/httpd/awhttpd/errors.c 2006-08-12 19:16:59.687500000 +1000 @@ -8,7 +8,6 @@ @@ -803,7 +804,7 @@ diff -Naur awhttpd/errors.c axTLS/httpd/awhttpd/errors.c diff -Naur awhttpd/index.c axTLS/httpd/awhttpd/index.c --- awhttpd/index.c 2005-06-04 14:09:52.000000000 +1000 -+++ axTLS/httpd/awhttpd/index.c 2006-08-12 18:25:58.406250000 +1000 ++++ axTLS/httpd/awhttpd/index.c 2006-08-12 19:16:59.687500000 +1000 @@ -11,7 +11,6 @@ #include #include @@ -850,7 +851,7 @@ diff -Naur awhttpd/index.c axTLS/httpd/awhttpd/index.c my_strncpy(cn->actualfile, tbuf, MAXREQUESTLENGTH); diff -Naur awhttpd/main.c axTLS/httpd/awhttpd/main.c --- awhttpd/main.c 2005-06-04 14:09:52.000000000 +1000 -+++ axTLS/httpd/awhttpd/main.c 2006-08-12 18:25:58.406250000 +1000 ++++ axTLS/httpd/awhttpd/main.c 2006-08-12 19:16:59.687500000 +1000 @@ -11,7 +11,6 @@ #include #include @@ -1084,7 +1085,7 @@ diff -Naur awhttpd/main.c axTLS/httpd/awhttpd/main.c return 0; diff -Naur awhttpd/mime_types.c axTLS/httpd/awhttpd/mime_types.c --- awhttpd/mime_types.c 2004-01-26 01:08:47.000000000 +1000 -+++ axTLS/httpd/awhttpd/mime_types.c 2006-08-12 18:25:58.421875000 +1000 ++++ axTLS/httpd/awhttpd/mime_types.c 2006-08-12 19:16:59.703125000 +1000 @@ -7,28 +7,21 @@ */ @@ -1169,7 +1170,7 @@ diff -Naur awhttpd/mime_types.c axTLS/httpd/awhttpd/mime_types.c + diff -Naur awhttpd/misc.c axTLS/httpd/awhttpd/misc.c --- awhttpd/misc.c 2005-01-23 12:59:09.000000000 +1000 -+++ axTLS/httpd/awhttpd/misc.c 2006-08-12 18:25:58.421875000 +1000 ++++ axTLS/httpd/awhttpd/misc.c 2006-08-12 19:16:59.703125000 +1000 @@ -7,33 +7,33 @@ */ @@ -1486,7 +1487,7 @@ diff -Naur awhttpd/misc.c axTLS/httpd/awhttpd/misc.c +#endif diff -Naur awhttpd/net.c axTLS/httpd/awhttpd/net.c --- awhttpd/net.c 2005-06-04 14:09:52.000000000 +1000 -+++ axTLS/httpd/awhttpd/net.c 2006-08-12 18:25:58.421875000 +1000 ++++ axTLS/httpd/awhttpd/net.c 2006-08-12 19:16:59.703125000 +1000 @@ -8,9 +8,7 @@ @@ -1597,7 +1598,7 @@ diff -Naur awhttpd/net.c axTLS/httpd/awhttpd/net.c diff -Naur awhttpd/permcheck.c axTLS/httpd/awhttpd/permcheck.c --- awhttpd/permcheck.c 2005-01-23 06:49:29.000000000 +1000 -+++ axTLS/httpd/awhttpd/permcheck.c 2006-08-12 18:25:58.421875000 +1000 ++++ axTLS/httpd/awhttpd/permcheck.c 2006-08-12 19:16:59.703125000 +1000 @@ -7,21 +7,23 @@ */ @@ -1688,7 +1689,7 @@ diff -Naur awhttpd/permcheck.c axTLS/httpd/awhttpd/permcheck.c +#endif /* CONFIG_HTTP_PERM_CHECK */ diff -Naur awhttpd/proc.c axTLS/httpd/awhttpd/proc.c --- awhttpd/proc.c 2005-01-23 10:59:41.000000000 +1000 -+++ axTLS/httpd/awhttpd/proc.c 2006-08-12 18:26:51.093750000 +1000 ++++ axTLS/httpd/awhttpd/proc.c 2006-08-12 19:16:59.703125000 +1000 @@ -13,91 +13,92 @@ #include #include @@ -2228,7 +2229,7 @@ diff -Naur awhttpd/proc.c axTLS/httpd/awhttpd/proc.c } diff -Naur awhttpd/socket.c axTLS/httpd/awhttpd/socket.c --- awhttpd/socket.c 2004-04-25 13:03:05.000000000 +1000 -+++ axTLS/httpd/awhttpd/socket.c 2006-08-12 18:25:58.437500000 +1000 ++++ axTLS/httpd/awhttpd/socket.c 2006-08-12 19:16:59.718750000 +1000 @@ -8,61 +8,17 @@ @@ -2349,7 +2350,7 @@ diff -Naur awhttpd/socket.c axTLS/httpd/awhttpd/socket.c memset(&(my_addr.sin_zero), 0, 8); // zero the rest of the struct diff -Naur awhttpd/urlencode.c axTLS/httpd/awhttpd/urlencode.c --- awhttpd/urlencode.c 2004-05-14 10:53:47.000000000 +1000 -+++ axTLS/httpd/awhttpd/urlencode.c 2006-08-12 18:25:58.437500000 +1000 ++++ axTLS/httpd/awhttpd/urlencode.c 2006-08-12 19:16:59.718750000 +1000 @@ -13,7 +13,7 @@ #include