Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix GH#12 - set num_headers every time a parse attempt is made

  • Loading branch information...
commit 8b5814df0028522d1f8a11696dcca248d1489daa 1 parent 197a76f
Jeremy Stashewsky authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 Feersum.xs
6 Feersum.xs
View
@@ -926,9 +926,13 @@ try_parse_http(struct feer_conn *c, size_t last_read)
struct feer_req *req = c->req;
if (likely(!req)) {
Newxz(req,1,struct feer_req);
- req->num_headers = MAX_HEADERS;
c->req = req;
}
+
+ // GH#12 - incremental parsing sets num_headers to 0 each time; force it
+ // back on every invocation
+ req->num_headers = MAX_HEADERS;
+
return phr_parse_request(SvPVX(c->rbuf), SvCUR(c->rbuf),
&req->method, &req->method_len,
&req->path, &req->path_len, &req->minor_version,
Please sign in to comment.
Something went wrong with that request. Please try again.