about summary refs log tree commit homepage
path: root/test/http-parser-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/http-parser-1.c')
-rw-r--r--test/http-parser-1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/http-parser-1.c b/test/http-parser-1.c
index c6ff819..ac20dd3 100644
--- a/test/http-parser-1.c
+++ b/test/http-parser-1.c
@@ -149,6 +149,15 @@ int main(void)
                        && "buffer repositioned to body start");
                 assert(!http->_p.usage_txt && "not a usage request");
         }
+        if ("HTTP/1.1 PUT Transfer-Encoding: bogus header") {
+                buf_set("PUT /foo HTTP/1.1\r\n"
+                        "Host: 127.6.6.6\r\n"
+                        "Transfer-Encoding: bogus\r\n"
+                        "\r\n"
+                        "16\r\npartial...");
+                state = mog_http_parse(http, buf, len);
+                assert(state == MOG_PARSER_ERROR && "parser not errored");
+        }
 
         if ("HTTP/1.1 PUT with Content-Range") {
                 buf_set("PUT /foo HTTP/1.1\r\n"