diff options
author | Paul Fox <pgf@brightstareng.com> | 2005-07-20 22:42:52 +0400 |
---|---|---|
committer | Paul Fox <pgf@brightstareng.com> | 2005-07-20 22:42:52 +0400 |
commit | 77ee52333c9bf64540752459101972fbeef539f8 (patch) | |
tree | c20f6360151f390afb2fea25a9be37481da51374 /networking/httpd.c | |
parent | 54690dc0b25d5413445d190696707478a9e8f604 (diff) |
applying fix for:
0000185: httpd infinite loop when piping to CGI script
Diffstat (limited to 'networking/httpd.c')
-rw-r--r-- | networking/httpd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 94fcfc8c1..e3f4027dc 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1259,6 +1259,8 @@ static int sendCgi(const char *url, post_readed_idx += count; if(post_readed_size == 0) post_readed_idx = 0; + } else { + post_readed_size = post_readed_idx = bodyLen = 0; /* broken pipe to CGI */ } } else if(bodyLen > 0 && post_readed_size == 0 && FD_ISSET(a_c_r, &readSet)) { count = bodyLen > sizeof(wbuf) ? sizeof(wbuf) : bodyLen; @@ -1266,7 +1268,7 @@ static int sendCgi(const char *url, if(count > 0) { post_readed_size += count; bodyLen -= count; - } else { + } else { bodyLen = 0; /* closed */ } } |