Commit f07792e7 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move bodystatus into struct http_conn

parent 980cce7f
......@@ -244,6 +244,7 @@ struct http_conn {
struct ws *ws;
txt rxbuf;
txt pipeline;
enum body_status body_status;
};
/*--------------------------------------------------------------------*/
......@@ -532,7 +533,6 @@ struct busyobj {
struct exp exp;
struct http_conn htc;
enum body_status body_status;
struct pool_task fetch_task;
struct vef_priv *vef_priv;
......
......@@ -276,7 +276,7 @@ fetch_straight(struct busyobj *bo, struct http_conn *htc, ssize_t cl)
{
int i;
assert(bo->body_status == BS_LENGTH);
assert(htc->body_status == BS_LENGTH);
if (cl < 0) {
return (FetchError(bo, "straight length field bogus"));
......@@ -303,7 +303,7 @@ fetch_chunked(struct busyobj *bo, struct http_conn *htc)
unsigned u;
ssize_t cl;
assert(bo->body_status == BS_CHUNKED);
assert(htc->body_status == BS_CHUNKED);
do {
/* Skip leading whitespace */
do {
......@@ -361,7 +361,7 @@ static void
fetch_eof(struct busyobj *bo, struct http_conn *htc)
{
assert(bo->body_status == BS_EOF);
assert(htc->body_status == BS_EOF);
if (VFP_Bytes(bo, htc, SSIZE_MAX) < 0)
(void)FetchError(bo,"eof socket fail");
}
......@@ -561,7 +561,7 @@ FetchBody(struct worker *wrk, void *priv)
/* XXX: pick up estimate from objdr ? */
cl = 0;
cls = 0;
switch (bo->body_status) {
switch (htc->body_status) {
case BS_NONE:
mklen = 0;
break;
......@@ -611,7 +611,7 @@ FetchBody(struct worker *wrk, void *priv)
bo->vfp = NULL;
VSLb(bo->vsl, SLT_Fetch_Body, "%u(%s) cls %d mklen %d",
bo->body_status, body_status(bo->body_status),
htc->body_status, body_status(htc->body_status),
cls, mklen);
http_Teardown(bo->bereq);
......
......@@ -216,7 +216,7 @@ pan_busyobj(const struct busyobj *bo)
if (bo->do_stream) VSB_printf(pan_vsp, " do_stream\n");
if (bo->should_close) VSB_printf(pan_vsp, " should_close\n");
VSB_printf(pan_vsp, " bodystatus = %d (%s),\n",
bo->body_status, body_status(bo->body_status));
bo->htc.body_status, body_status(bo->htc.body_status));
VSB_printf(pan_vsp, " },\n");
if (VALID_OBJ(bo->vbc, BACKEND_MAGIC))
pan_vbc(bo->vbc);
......
......@@ -392,7 +392,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
* headers are adultered by VCL
* NB: Also sets other wrk variables
*/
bo->body_status = RFC2616_Body(bo, &wrk->stats);
bo->htc.body_status = RFC2616_Body(bo, &wrk->stats);
req->err_code = http_GetStatus(bo->beresp);
......@@ -557,7 +557,7 @@ cnt_fetchbody(struct worker *wrk, struct req *req)
bo->do_stream = 0;
/* No reason to try streaming a non-existing body */
if (bo->body_status == BS_NONE)
if (bo->htc.body_status == BS_NONE)
bo->do_stream = 0;
l = http_EstimateWS(bo->beresp,
......
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