diff options
author | adam <adam@pkgsrc.org> | 2006-01-06 22:46:51 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2006-01-06 22:46:51 +0000 |
commit | 8e5abd345e4f0fdf37e933d1e310d86d945058d4 (patch) | |
tree | 5b8c0dbcde41e5a3d8ee82663d63597c1aeaafd8 /www/cgic/patches/patch-ac | |
parent | f967965ad486f56a10310c3931241d92832900db (diff) | |
download | pkgsrc-8e5abd345e4f0fdf37e933d1e310d86d945058d4.tar.gz |
Changes 2.05:
Temporary files used to accept file uploads were not closed properly. This
resulted in a file descriptor leak, which was unlikely to be serious because of
the short lifespan of CGI programs and the fact that very few forms upload many
files at once. However, on the Windows platform and possibly some others, file
locking semantics prevented file uploads from working at all with these files
not properly closed. Fixed in 2.05.
Changes 2.04:
Documentation fixes: the cgiHtmlEscape, cgiHtmlEscapeData, cgiValueEscape, and
cgiValueEscapeData routines were named incorrectly in the manual. No code
changes in version 2.04.
Changes 2.03:
Support for setting cookies has been reimplemented. The new code closely
follows the actual practice of web sites that successfully use cookies, rather
than attempting to implement the specification. The new code can successfully
set more than one cookie at a time in typical web browsers.
Diffstat (limited to 'www/cgic/patches/patch-ac')
-rw-r--r-- | www/cgic/patches/patch-ac | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/www/cgic/patches/patch-ac b/www/cgic/patches/patch-ac index eb7a2089d20..862a25a3668 100644 --- a/www/cgic/patches/patch-ac +++ b/www/cgic/patches/patch-ac @@ -1,10 +1,10 @@ -$NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ +$NetBSD: patch-ac,v 1.2 2006/01/06 22:46:51 adam Exp $ ---- cgic.c.orig Sun Jan 12 13:59:43 2003 +--- cgic.c.orig 2004-11-15 17:57:59.000000000 +0100 +++ cgic.c -@@ -124,8 +124,9 @@ static int cgiStrBeginsNc(char *s1, char - - static int firstCookie = 1; +@@ -119,8 +119,9 @@ static void cgiFreeResources(); + static int cgiStrEqNc(char *s1, char *s2); + static int cgiStrBeginsNc(char *s1, char *s2); -int main(int argc, char *argv[]) { - int result; @@ -14,7 +14,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ char *cgiContentLengthString; char *e; cgiSetupConstants(); -@@ -211,17 +212,6 @@ int main(int argc, char *argv[]) { +@@ -206,17 +207,6 @@ int main(int argc, char *argv[]) { cgiOut = stdout; cgiRestored = 0; @@ -32,25 +32,15 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ if (cgiStrEqNc(cgiRequestMethod, "post")) { #ifdef CGICDEBUG CGICDEBUGSTART -@@ -290,9 +280,9 @@ int main(int argc, char *argv[]) { +@@ -284,9 +274,8 @@ int main(int argc, char *argv[]) { + #endif /* CGICDEBUG */ } } - firstCookie = 1; - result = cgiMain(); - cgiFreeResources(); - return result; -+ -+ atexit(cgiFreeResources); -+ return(0); ++ atexit(cgiFreeResources); ++ return 0; } static void cgiGetenv(char **s, char *var){ -@@ -1995,7 +1985,7 @@ cgiEnvironmentResultType cgiReadEnvironm - FILE *in; - cgiFormEntry *e = 0, *p; - char *version; -- cgiEnvironmentResultType result; -+ cgiEnvironmentResultType result = cgiEnvironmentSuccess; - /* Free any existing data first */ - cgiFreeResources(); - /* Be sure to open in binary mode */ |