From 0983c810ea52902ccaa9948fe41369e13410338a Mon Sep 17 00:00:00 2001 From: Nathan Angelacos Date: Wed, 17 Dec 2008 01:47:59 +0000 Subject: Err... the null content-length check didnt check --- src/haserl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/haserl.c b/src/haserl.c index da7c755..4b7d2f2 100644 --- a/src/haserl.c +++ b/src/haserl.c @@ -470,7 +470,8 @@ ReadCGIPOSTValues (list_t * env) unsigned char *data; const char *CONTENT_LENGTH = "CONTENT_LENGTH"; - if (getenv (CONTENT_LENGTH) == NULL) + if ((getenv (CONTENT_LENGTH) == NULL) || + (strtoul (getenv(CONTENT_LENGTH), NULL, 10) == 0 )) return (0); if (getenv ("CONTENT_TYPE")) @@ -486,8 +487,7 @@ ReadCGIPOSTValues (list_t * env) s_buffer_init (&sbuf, 32768); sbuf.fh = STDIN; - if ((getenv (CONTENT_LENGTH)) || - (strtoul (getenv(CONTENT_LENGTH), NULL, 10) == 0 )) + if (getenv (CONTENT_LENGTH)) { sbuf.maxread = strtoul (getenv (CONTENT_LENGTH), NULL, 10); } -- cgit v1.2.3