void http_FilterResp(const struct http *fm, struct http *to, unsigned how) { CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); http_SetH(to, HTTP_HDR_PROTO, "HTTP/1.1"); to->status = fm->status; http_linkh(to, fm, HTTP_HDR_RESPONSE); http_filterfields(to, fm, how); }
void http_FilterReq(struct http *to, const struct http *fm, unsigned how) { CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); http_linkh(to, fm, HTTP_HDR_METHOD); http_linkh(to, fm, HTTP_HDR_URL); http_linkh(to, fm, HTTP_HDR_PROTO); http_filterfields(to, fm, how); }
void http_FilterResp(const struct http *fm, struct http *to, unsigned how) { CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); to->status = fm->status; http_linkh(to, fm, HTTP_HDR_PROTO); http_linkh(to, fm, HTTP_HDR_STATUS); http_linkh(to, fm, HTTP_HDR_REASON); http_filterfields(to, fm, how); }
void http_FilterReq(struct http *to, const struct http *fm, unsigned how) { CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); http_linkh(to, fm, HTTP_HDR_METHOD); http_linkh(to, fm, HTTP_HDR_URL); if (how == HTTPH_R_FETCH) http_SetH(to, HTTP_HDR_PROTO, "HTTP/1.1"); else http_linkh(to, fm, HTTP_HDR_PROTO); http_filterfields(to, fm, how); }
void http_FilterReq(const struct req *req, unsigned how) { struct http *hp; hp = req->busyobj->bereq; CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); http_linkh(hp, req->http, HTTP_HDR_METHOD); http_linkh(hp, req->http, HTTP_HDR_URL); if (how == HTTPH_R_FETCH) http_SetH(hp, HTTP_HDR_PROTO, "HTTP/1.1"); else http_linkh(hp, req->http, HTTP_HDR_PROTO); http_filterfields(hp, req->http, how); http_PrintfHeader(hp, "X-Varnish: %u", req->vsl->wid & VSL_IDENTMASK); }
void http_FilterReq(const struct sess *sp, unsigned how) { struct http *hp; hp = sp->req->busyobj->bereq; CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); hp->logtag = HTTP_Tx; http_linkh(hp, sp->req->http, HTTP_HDR_REQ); http_linkh(hp, sp->req->http, HTTP_HDR_URL); if (how == HTTPH_R_FETCH) http_SetH(hp, HTTP_HDR_PROTO, "HTTP/1.1"); else http_linkh(hp, sp->req->http, HTTP_HDR_PROTO); http_filterfields(hp, sp->req->http, how); http_PrintfHeader(hp, "X-Varnish: %u", sp->req->xid); }