/*
- * $Id: HttpRequest.cc,v 1.2 1998/05/11 18:44:28 rousskov Exp $
+ * $Id: HttpRequest.cc,v 1.3 1998/05/11 20:56:06 rousskov Exp $
*
* DEBUG: section 73 HTTP Request
* AUTHOR: Duane Wessels
safe_free(req->body);
stringClean(&req->urlpath);
httpHeaderClean(&req->header);
+ if (req->cache_control)
+ httpHdrCcDestroy(req->cache_control);
memFree(MEM_REQUEST_T, req);
}
request->link_count--;
if (request->link_count > 0)
return;
- requestDestroy(request);
+ if (request->link_count == 0)
+ requestDestroy(request);
+ else
+ debug(73, 1) ("requestUnlink: BUG: negative link_count: %d. Ignored.\n",
+ request->link_count);
}
int
/*
- * $Id: client_side.cc,v 1.301 1998/05/11 18:44:34 rousskov Exp $
+ * $Id: client_side.cc,v 1.302 1998/05/11 20:56:07 rousskov Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
{
const request_t *r = http->request;
assert(r);
- if (EBIT_TEST(r->flags, REQ_CC_ONLY_IF_CACHED)) {
- /* future interface:
- * if (r->cache_control && EBIT_TEST(r->cache_control->mask, CC_ONLY_IF_CACHED)) { */
- return 1;
- } else
- return 0;
+ return r->cache_control &&
+ EBIT_TEST(r->cache_control->mask, CC_ONLY_IF_CACHED);
}
static HttpReply *
String urlpath;
int link_count; /* free when zero */
int flags;
- HttpHdrCc *cache_control; /* not used yet */
+ HttpHdrCc *cache_control;
time_t max_age;
float http_ver;
time_t ims;