else
http_PutStatus(sp->wrk, sp->fd, sp->obj->http, 503);
+ sp->err_code = http_GetStatus(sp->obj->http);
+WSP(sp, SLT_Debug, "i %d err %d v %d c %d", i, sp->err_code, sp->obj->valid, sp->obj->cacheable);
VCL_fetch_method(sp);
switch (sp->handling) {
vc = VBE_GetFd(sp);
if (vc == NULL)
- return (1);
+ return (__LINE__);
WRK_Reset(w, &vc->fd);
http_Write(w, hp, 0);
if (WRK_Flush(w)) {
VBE_UpdateHealth(sp, vc, -1);
VBE_ClosedFd(sp->wrk, vc);
/* XXX: other cleanup ? */
- return (1);
+ return (__LINE__);
}
/* XXX is this the right place? */
VBE_UpdateHealth(sp, vc, -2);
VBE_ClosedFd(sp->wrk, vc);
/* XXX: other cleanup ? */
- return (1);
+ return (__LINE__);
}
sp->obj->entered = TIM_real();
WSL(sp->wrk, SLT_Debug, vc->fd, "Invalid Transfer-Encoding");
VBE_UpdateHealth(sp, vc, -3);
VBE_ClosedFd(sp->wrk, vc);
- return (-1);
+ return (__LINE__);
} else if (strcmp(http_GetProto(hp), "HTTP/1.1")) {
switch (http_GetStatus(hp)) {
case 200:
}
VBE_UpdateHealth(sp, vc, -4);
VBE_ClosedFd(sp->wrk, vc);
- return (-1);
+ return (__LINE__);
}
{
CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC);
CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
to->nhd = HTTP_HDR_FIRST;
+ to->status = fm->status;
for (u = HTTP_HDR_FIRST; u < fm->nhd; u++) {
if (fm->hdf[u] & HDF_FILTER)
continue;
double now;
int fd;
+ WSL_Flush(sp->wrk);
assert(status >= 100 && status <= 999);
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
"\n"
"sub vcl_hash {\n"
" set req.hash += req.url;\n"
-#if 1
- " set req.hash += req.http.host;\n"
-#else
" if (req.http.host) {\n"
" set req.hash += req.http.host;\n"
" } else {\n"
- " set req.hash += server.ip;\n" /* XXX: see ticket 137 */
+ " set req.hash += server.ip;\n"
" }\n"
-#endif
" hash;\n"
"}\n"
"\n"
* We do not support ranges yet, so 206 is out.
*/
sp->obj->response = http_GetStatus(hp);
+WSP(sp, SLT_Debug, "resp: %d", sp->obj->response);
switch (sp->obj->response) {
case 200: /* OK */
case 203: /* Non-Authoritative Information */