/*
- * $Id: client_side.cc,v 1.107 1997/05/23 17:21:17 wessels Exp $
+ * $Id: client_side.cc,v 1.108 1997/06/01 18:19:51 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
{
clientHttpRequest *http = data;
char *url = http->url;
- char *request_hdr = http->request_hdr;
StoreEntry *entry = NULL;
debug(33, 3, "icpProcessExpired: FD %d '%s'\n", fd, http->url);
BIT_SET(http->request->flags, REQ_REFRESH);
http->old_entry = http->entry;
entry = storeCreateEntry(url,
- request_hdr,
- http->req_hdr_sz,
http->request->flags,
http->request->method);
/* NOTE, don't call storeLockObject(), storeCreateEntry() does it */
/*
- * $Id: ftp.cc,v 1.113 1997/06/01 04:23:11 wessels Exp $
+ * $Id: ftp.cc,v 1.114 1997/06/01 18:19:52 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
LOCAL_ARRAY(char, realm, 8192);
char *url = entry->url;
FtpStateData *ftpState = xcalloc(1, sizeof(FtpStateData));
- char *req_hdr;
char *response;
int fd;
debug(9, 3, "FtpStart: '%s'\n", entry->url);
storeLockObject(entry);
ftpState->entry = entry;
- req_hdr = entry->mem_obj->request_hdr;
ftpState->request = requestLink(request);
ftpState->ctrl.fd = -1;
ftpState->data.fd = -1;
EBIT_SET(ftpState->flags, FTP_PASV_SUPPORTED);
EBIT_SET(ftpState->flags, FTP_REST_SUPPORTED);
- if (!ftpCheckAuth(ftpState, req_hdr)) {
+ if (!ftpCheckAuth(ftpState, request->headers)) {
/* This request is not fully authenticated */
if (request->port == 21) {
sprintf(realm, "ftp %s", ftpState->user);
/*
- * $Id: http.cc,v 1.164 1997/05/23 05:20:57 wessels Exp $
+ * $Id: http.cc,v 1.165 1997/06/01 18:19:52 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
debug(11, 5, "httpSendRequest: FD %d: httpState %p.\n", fd, httpState);
buflen = strlen(req->urlpath);
- if (httpState->req_hdr)
- buflen += httpState->req_hdr_sz + 1;
+ if (req->headers)
+ buflen += req->headers_sz + 1;
buflen += 512; /* lots of extra */
if ((req->method == METHOD_POST || req->method == METHOD_PUT)) {
len = httpBuildRequestHeader(req,
httpState->orig_request ? httpState->orig_request : req,
entry,
- httpState->req_hdr,
+ req->headers,
NULL,
buf,
buflen,
int fd;
debug(11, 3, "proxyhttpStart: \"%s %s\"\n",
RequestMethodStr[orig_request->method], entry->url);
- debug(11, 10, "proxyhttpStart: HTTP request header:\n%s\n",
- entry->mem_obj->request_hdr);
if (e->options & NEIGHBOR_PROXY_ONLY)
#if DONT_USE_VM
storeReleaseRequest(entry);
storeLockObject(entry);
httpState = xcalloc(1, sizeof(HttpStateData));
httpState->entry = entry;
- httpState->req_hdr = entry->mem_obj->request_hdr;
- httpState->req_hdr_sz = entry->mem_obj->request_hdr_sz;
request = get_free_request_t();
httpState->request = requestLink(request);
httpState->neighbor = e;
storeLockObject(entry);
httpState = xcalloc(1, sizeof(HttpStateData));
httpState->entry = entry;
- httpState->req_hdr = entry->mem_obj->request_hdr;
- httpState->req_hdr_sz = entry->mem_obj->request_hdr_sz;
httpState->request = requestLink(request);
httpState->fd = fd;
comm_add_close_handler(httpState->fd,
/*
- * $Id: store.cc,v 1.245 1997/05/23 20:45:58 wessels Exp $
+ * $Id: store.cc,v 1.246 1997/06/01 18:19:56 wessels Exp $
*
* DEBUG: section 20 Storeage Manager
* AUTHOR: Harvest Derived
debug(20, 3, "destroy_MemObject: destroying %p\n", mem);
destroy_MemObjectData(mem);
safe_free(mem->clients);
- safe_free(mem->request_hdr);
safe_free(mem->reply);
safe_free(mem->e_abort_msg);
requestUnlink(mem->request);
}
StoreEntry *
-storeCreateEntry(const char *url,
- const char *req_hdr,
- int req_hdr_sz,
- int flags,
- method_t method)
+storeCreateEntry(const char *url, int flags, method_t method)
{
StoreEntry *e = NULL;
MemObject *mem = NULL;
e->url = xstrdup(url);
meta_data.url_strings += strlen(url);
e->method = method;
- if (req_hdr) {
- mem->request_hdr_sz = req_hdr_sz;
- mem->request_hdr = xmalloc(req_hdr_sz + 1);
- xmemcpy(mem->request_hdr, req_hdr, req_hdr_sz);
- *(mem->request_hdr + req_hdr_sz) = '\0';
- }
if (BIT_TEST(flags, REQ_CACHABLE)) {
BIT_SET(e->flag, ENTRY_CACHABLE);
BIT_RESET(e->flag, RELEASE_REQUEST);
storeSetMemStatus(e, IN_MEMORY);
e->swap_status = NO_SWAP;
InvokeHandlers(e);
- safe_free(e->mem_obj->request_hdr);
if (BIT_TEST(e->flag, RELEASE_REQUEST))
storeRelease(e);
else if (storeCheckSwapable(e))