diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-06-26 00:41:54 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-07-10 00:55:49 +0000 |
commit | 70efa665edeef05f53978f9d541f411b0e1a2b2a (patch) | |
tree | dd47ba56a3724efff70ebc74855873259a92d48e | |
parent | c86b6a2c769c821a64fc14c62a953244b41cb190 (diff) | |
download | cmogstored-70efa665edeef05f53978f9d541f411b0e1a2b2a.tar.gz |
We need to ensure we do not introduce code to launch http_process_client while we have buffered data (or socket write errors).
-rw-r--r-- | http.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -64,6 +64,9 @@ http_process_client(struct mog_fd *mfd, char *buf, size_t buf_len) { struct mog_http *http = &mfd->as.http; + assert(http->wbuf == NULL && + "processing client with buffered data"); + switch (http->_p.http_method) { case MOG_HTTP_METHOD_NONE: assert(0 && "BUG: unset HTTP method"); case MOG_HTTP_METHOD_GET: mog_http_get_open(mfd, buf); break; |