Commit af52295e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Add a couple of asserts to make sure we only do ims/range on 200.

parent f7fd7ef0
......@@ -47,6 +47,7 @@ res_do_304(struct sess *sp)
char lm[64];
char *p;
assert(sp->obj->response == 200);
http_ClrHeader(sp->wrk->resp);
sp->wrk->resp->logtag = HTTP_Tx;
http_SetResp(sp->wrk->resp, "HTTP/1.1", 304, "Not Modified");
......@@ -127,7 +128,7 @@ res_dorange(struct sess *sp, const char *r, ssize_t *plow, ssize_t *phigh)
{
ssize_t low, high, has_low;
(void)sp;
assert(sp->obj->response == 200);
if (strncmp(r, "bytes=", 6))
return;
r += 6;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment