Mercurial > urweb
diff src/c/fastcgi.c @ 1055:118a5a08a881
Merge
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 03 Dec 2009 11:56:15 -0500 |
parents | c2317cfb99ec |
children | db52c32dbe42 |
line wrap: on
line diff
--- a/src/c/fastcgi.c Thu Dec 03 11:50:51 2009 -0500 +++ b/src/c/fastcgi.c Thu Dec 03 11:56:15 2009 -0500 @@ -223,7 +223,7 @@ else if (*len < 4) return -1; else { - int r = (((*buf)[3] & 0x7f) << 24) + ((*buf)[2] << 16) + ((*buf)[1] << 8) + (*buf)[0]; + int r = (((*buf)[0] & 0x7f) << 24) + ((*buf)[1] << 16) + ((*buf)[2] << 8) + (*buf)[3]; *buf += 4; *len -= 4; return r; @@ -236,9 +236,9 @@ if ((nameLength = read_funny_len(buf, &len)) < 0) return -1; if ((valueLength = read_funny_len(buf, &len)) < 0) - return -1; + return -2; if (len < nameLength + valueLength) - return -1; + return -3; if (nameLength+1 > nv->name_len) { nv->name_len = nameLength+1; @@ -374,7 +374,7 @@ goto done; } - write_stderr(out, "PARAM: %s -> %s\n", hs.nvps[used_nvps].name, hs.nvps[used_nvps].value); + //write_stderr(out, "PARAM: %s -> %s\n", hs.nvps[used_nvps].name, hs.nvps[used_nvps].value); ++used_nvps; }