]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
removed OLD_CODE
authorwessels <>
Tue, 21 Jul 1998 01:25:28 +0000 (01:25 +0000)
committerwessels <>
Tue, 21 Jul 1998 01:25:28 +0000 (01:25 +0000)
17 files changed:
src/CacheDigest.cc
src/HttpReply.cc
src/HttpRequest.cc
src/asn.cc
src/cache_manager.cc
src/ftp.cc
src/gopher.cc
src/http.cc
src/icp_v2.cc
src/icp_v3.cc
src/net_db.cc
src/peer_digest.cc
src/protos.h
src/store_dir.cc
src/url.cc
src/urn.cc
src/wais.cc

index 77791ef8cea98d273531cbdef452685c5fce08df..a8a1d2d180df179f8c308fa8d8401a18c30b8d07 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: CacheDigest.cc,v 1.23 1998/07/20 17:18:59 wessels Exp $
+ * $Id: CacheDigest.cc,v 1.24 1998/07/20 19:25:28 wessels Exp $
  *
  * DEBUG: section 70    Cache Digest
  * AUTHOR: Alex Rousskov
@@ -297,26 +297,6 @@ cacheDigestCalcMaskSize(int cap, int bpe)
     return (size_t) (cap * bpe + 7) / 8;
 }
 
-#if OLD_CODE
-       /*
-        * This has byte-order bugs
-        */
-static void
-cacheDigestHashKey(const CacheDigest * cd, const cache_key * key)
-{
-    const int bit_count = cd->mask_size * 8;
-    /* get four hashed values */
-    memcpy(hashed_keys, key, sizeof(hashed_keys));
-    /* wrap */
-    hashed_keys[0] %= bit_count;
-    hashed_keys[1] %= bit_count;
-    hashed_keys[2] %= bit_count;
-    hashed_keys[3] %= bit_count;
-    debug(70, 9) ("cacheDigestHashKey: %s -(%d)-> %d %d %d %d\n",
-       storeKeyText(key), bit_count, hashed_keys[0], hashed_keys[1], hashed_keys[2], hashed_keys[3]);
-}
-#endif
-
 static void
 cacheDigestHashKey(const CacheDigest * cd, const cache_key * key)
 {
index 0cf364eeebcb1608a65e936a89b3c5b306204e30..d4098702e95d26e0fb409b7b68b256b1760a8b14 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.cc,v 1.27 1998/07/20 17:19:07 wessels Exp $
+ * $Id: HttpReply.cc,v 1.28 1998/07/20 19:26:48 wessels Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -243,16 +243,6 @@ httpReplySetHeaders(HttpReply * reply, double ver, http_status status, const cha
 void
 httpReplyUpdateOnNotModified(HttpReply * rep, HttpReply * freshRep)
 {
-#if OLD_CODE
-    rep->cache_control = freshRep->cache_control;
-    rep->misc_headers = freshRep->misc_headers;
-    if (freshRep->date > -1)
-       rep->date = freshRep->date;
-    if (freshRep->last_modified > -1)
-       rep->last_modified = freshRep->last_modified;
-    if (freshRep->expires > -1)
-       rep->expires = freshRep->expires;
-#endif
     assert(rep && freshRep);
     /* clean cache */
     httpReplyHdrCacheClean(rep);
index 496622720169cbcf02e4dc6d9ed2bc101c439583..56484b95677309ccc0ec57c41c245d140ade6a26 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.cc,v 1.11 1998/07/20 19:19:47 wessels Exp $
+ * $Id: HttpRequest.cc,v 1.12 1998/07/20 19:26:49 wessels Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -121,21 +121,8 @@ httpRequestPack(const request_t * req, Packer *p)
 void
 httpRequestSetHeaders(request_t * req, method_t method, const char *uri, const char *header_str)
 {
-#if OLD_CODE
-    MemBuf mb;
-    assert(req && uri && header_str);
-    assert(!req->prefix);
-
-    memBufDefInit(&mb);
-    memBufPrintf(&mb, "%s %s HTTP/%3.1f\r\n%s\r\n",
-       RequestMethodStr[method], uri, req->http_ver, header_str);
-    req->prefix = xstrdup(mb.buf);
-    req->prefix_sz = mb.size;
-    memBufClean(&mb);
-#else
     assert(req && uri && header_str);
     assert(!req->header.len);
-#endif
     httpHeaderParse(&req->header, header_str, header_str + strlen(header_str));
 }
 
index ae3f0b0dd365a08a2a4c03c0a3438e422dd665a1..09d0cce79dba59402e2c9b9bf50be7bb5b53a1a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asn.cc,v 1.41 1998/07/20 17:19:18 wessels Exp $
+ * $Id: asn.cc,v 1.42 1998/07/20 19:25:29 wessels Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -175,10 +175,6 @@ asnCacheStart(int as)
     req = urlParse(METHOD_GET, asres);
     assert(NULL != req);
     asState->request = requestLink(req);
-#if OLD_CODE
-    asState->request->headers = xstrdup("\r\n");
-    asState->request->headers_sz = strlen(asState->request->headers);
-#endif
     if ((e = storeGet(k)) == NULL) {
        e = storeCreateEntry(asres, asres, 0, METHOD_GET);
        storeClientListAdd(e, asState);
index d559ddfcfed093ee23f56a3633f8a9ef88ddf094..b02ac4050c15c5b990af13ffae1dd1d4fdee3e17 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_manager.cc,v 1.13 1998/07/20 17:19:22 wessels Exp $
+ * $Id: cache_manager.cc,v 1.14 1998/07/20 19:25:30 wessels Exp $
  *
  * DEBUG: section 16    Cache Manager Objects
  * AUTHOR: Duane Wessels
@@ -127,22 +127,9 @@ cachemgrParseHeaders(cachemgrStateData * mgr, const request_t * request)
     const char *basic_cookie;  /* base 64 _decoded_ user:passwd pair */
     const char *passwd_del;
     assert(mgr && request);
-#if OLD_CODE
-    const char *authField;
-    /* this parsing will go away when hdrs are added to request_t @?@ */
-    basic_cookie = mime_get_auth(request->headers, "Basic", &authField);
-    debug(16, 9) ("cachemgrParseHeaders: got auth: '%s'\n", authField ? authField : "<none>");
-    if (!authField)
-       return;
-    if (!basic_cookie) {
-       debug(16, 1) ("cachemgrParseHeaders: unknown auth format in '%s'\n", authField);
-       return;
-    }
-#else
     basic_cookie = httpHeaderGetAuth(&request->header, HDR_AUTHORIZATION, "Basic");
     if (!basic_cookie)
        return;
-#endif
     if (!(passwd_del = strchr(basic_cookie, ':'))) {
        debug(16, 1) ("cachemgrParseHeaders: unknown basic_cookie format '%s'\n", basic_cookie);
        return;
index 35466a53907e9b349d1851a2483a945ea2a6b67c..885ed7e6dc2fa0b8bac7a9811c1e7fbe003a5121 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.235 1998/07/20 17:19:41 wessels Exp $
+ * $Id: ftp.cc,v 1.236 1998/07/20 19:25:31 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -145,9 +145,6 @@ static void ftpLoginParser(const char *, FtpStateData *);
 static wordlist *ftpParseControlReply(char *, size_t, int *, int *);
 static void ftpAppendSuccessHeader(FtpStateData * ftpState);
 static void ftpAuthRequired(HttpReply * reply, request_t * request, const char *realm);
-#if OLD_CODE
-static STABH ftpAbort;
-#endif
 static void ftpHackShortcut(FtpStateData * ftpState, FTPSM * nextState);
 static void ftpPutStart(FtpStateData *);
 static CWCB ftpPutTransferDone;
@@ -867,11 +864,7 @@ ftpCheckAuth(FtpStateData * ftpState, const HttpHeader * req_hdr)
     if (ftpState->password[0])
        return 1;               /* passwd with no name? */
     /* URL has name, but no passwd */
-#if OLD_CODE
-    if (!(auth = mime_get_auth(req_hdr, "Basic", NULL)))
-#else
     if (!(auth = httpHeaderGetAuth(req_hdr, HDR_AUTHORIZATION, "Basic")))
-#endif
        return 0;               /* need auth header */
     orig_user = xstrdup(ftpState->user);
     ftpLoginParser(auth, ftpState);
@@ -982,9 +975,6 @@ ftpStart(request_t * request, StoreEntry * entry, int fd)
        ftpState->request->host, strBuf(ftpState->request->urlpath),
        ftpState->user, ftpState->password);
     comm_add_close_handler(fd, ftpStateFree, ftpState);
-#if OLD_CODE
-    storeRegisterAbort(entry, ftpAbort, ftpState);
-#endif
     ftpState->state = BEGIN;
     ftpState->ctrl.buf = memAllocate(MEM_4K_BUF);
     ftpState->ctrl.freefunc = memFree4K;
@@ -2223,20 +2213,6 @@ ftpAppendSuccessHeader(FtpStateData * ftpState)
     storeSetPublicKey(e);
 }
 
-#if OLD_CODE
-static void
-ftpAbort(void *data)
-{
-    FtpStateData *ftpState = data;
-    debug(9, 2) ("ftpAbort: %s\n", storeUrl(ftpState->entry));
-    if (ftpState->data.fd >= 0) {
-       comm_close(ftpState->data.fd);
-       ftpState->data.fd = -1;
-    }
-    comm_close(ftpState->ctrl.fd);
-}
-#endif
-
 static void
 ftpAuthRequired(HttpReply * old_reply, request_t * request, const char *realm)
 {
index 7ab43166085a870cce5950bd5c2a6b83ff59972c..e447c14b2caf7a3147e2b9c8eea67347eebcfc43 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: gopher.cc,v 1.131 1998/07/20 17:19:42 wessels Exp $
+ * $Id: gopher.cc,v 1.132 1998/07/20 19:25:32 wessels Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -175,9 +175,6 @@ static PF gopherReadReply;
 static CWCB gopherSendComplete;
 static PF gopherSendRequest;
 static GopherStateData *CreateGopherStateData(void);
-#if OLD_CODE
-static STABH gopherAbort;
-#endif
 
 static char def_gopher_bin[] = "www/unknown";
 static char def_gopher_text[] = "text/plain";
@@ -189,9 +186,6 @@ gopherStateFree(int fdnotused, void *data)
     if (gopherState == NULL)
        return;
     if (gopherState->entry) {
-#if OLD_CODE
-       storeUnregisterAbort(gopherState->entry);
-#endif
        storeUnlockObject(gopherState->entry);
     }
     memFree(MEM_4K_BUF, gopherState->buf);
@@ -854,9 +848,6 @@ gopherStart(StoreEntry * entry, int fd)
        return;
     }
     comm_add_close_handler(fd, gopherStateFree, gopherState);
-#if OLD_CODE
-    storeRegisterAbort(entry, gopherAbort, gopherState);
-#endif
     if (((gopherState->type_id == GOPHER_INDEX) || (gopherState->type_id == GOPHER_CSO))
        && (strchr(gopherState->request, '?') == NULL)) {
        /* Index URL without query word */
@@ -889,13 +880,3 @@ CreateGopherStateData(void)
     gd->buf = memAllocate(MEM_4K_BUF);
     return (gd);
 }
-
-#if OLD_CODE
-static void
-gopherAbort(void *data)
-{
-    GopherStateData *gopherState = data;
-    debug(10, 1) ("gopherAbort: %s\n", storeUrl(gopherState->entry));
-    comm_close(gopherState->fd);
-}
-#endif
index b9e1d9c3df15aa43183bff96fb708fedb6a66719..cdbb123c2e9f887aec541c4289e7b9c8da2924c5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.296 1998/07/20 17:19:45 wessels Exp $
+ * $Id: http.cc,v 1.297 1998/07/20 19:25:34 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -121,9 +121,6 @@ static PF httpReadReply;
 static PF httpSendRequest;
 static PF httpStateFree;
 static PF httpTimeout;
-#if OLD_CODE
-static void httpAppendRequestHeader(char *hdr, const char *line, size_t * sz, size_t max, int);
-#endif
 static void httpCacheNegatively(StoreEntry *);
 static void httpMakePrivate(StoreEntry *);
 static void httpMakePublic(StoreEntry *);
@@ -135,9 +132,6 @@ httpStateFree(int fdnotused, void *data)
     HttpStateData *httpState = data;
     if (httpState == NULL)
        return;
-#if OLD_CODE
-    storeUnregisterAbort(httpState->entry);
-#endif
     storeUnlockObject(httpState->entry);
     if (httpState->reply_hdr) {
        memFree(MEM_8K_BUF, httpState->reply_hdr);
@@ -554,30 +548,6 @@ httpSendComplete(int fd, char *bufnotused, size_t size, int errflag, void *data)
     }
 }
 
-#if OLD_CODE
-static void
-httpAppendRequestHeader(char *hdr, const char *line, size_t * sz, size_t max, int check)
-{
-    size_t n = *sz + strlen(line) + 2;
-    if (n >= max)
-       return;
-    if (check) {
-       if (Config.onoff.anonymizer == ANONYMIZER_PARANOID) {
-           if (!httpAnonAllowed(line))
-               return;
-       } else if (Config.onoff.anonymizer == ANONYMIZER_STANDARD) {
-           if (httpAnonDenied(line))
-               return;
-       }
-    }
-    /* allowed header, explicitly known to be not dangerous */
-    debug(11, 5) ("httpAppendRequestHeader: %s\n", line);
-    strcpy(hdr + (*sz), line);
-    strcat(hdr + (*sz), crlf);
-    *sz = n;
-}
-#endif
-
 /*
  * build request headers and append them to a given MemBuf 
  * used by httpBuildRequestPrefix()
@@ -599,13 +569,7 @@ httpBuildRequestHeader(request_t * request,
     int filter_range;
     const HttpHeaderEntry *e;
     HttpHeaderPos pos = HttpHeaderInitPos;
-
-#if OLD_CODE
-    assert(orig_request->prefix != NULL);
-    debug(11, 3) ("httpBuildRequestHeader:\n%s", orig_request->prefix);
-#endif
     httpHeaderInit(hdr_out, hoRequest);
-
     /* append our IMS header */
     if (entry && entry->lastmod > -1 && request->method == METHOD_GET)
        httpHeaderPutTime(hdr_out, HDR_IF_MODIFIED_SINCE, entry->lastmod);
index f94520bc02bb0ce6469e5e1ac715efd2ec4957b6..f1883925dd85c3114f7ca082e583851458cd0a7a 100644 (file)
@@ -270,14 +270,8 @@ icpHandleIcpV2(int fd, struct sockaddr_in from, char *buf, int len)
            header.opcode, inet_ntoa(from.sin_addr));
        break;
     }
-    if (icp_request) {
-#if OLD_CODE
-       stringClean(&icp_request->urlpath);
-       memFree(MEM_REQUEST_T, icp_request);
-#else
+    if (icp_request)
        requestDestroy(icp_request);
-#endif
-    }
 }
 
 #ifdef ICP_PKT_DUMP
index 3ee5eaf35ce9f49b2d2b3ac1a216d31373a44494..9986889a175cf0878f7b14666f8ea0363e696728 100644 (file)
@@ -110,12 +110,6 @@ icpHandleIcpV3(int fd, struct sockaddr_in from, char *buf, int len)
            header.opcode, inet_ntoa(from.sin_addr));
        break;
     }
-    if (icp_request) {
-#if OLD_CODE
-       stringClean(&icp_request->urlpath);
-       memFree(MEM_REQUEST_T, icp_request);
-#else
+    if (icp_request)
        requestDestroy(icp_request);
-#endif
-    }
 }
index f05e19d3200646b9b3e00da8d78095a31e16a130..6b400b3f7394d983e0a162493303c859b2514333 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.117 1998/07/20 17:19:56 wessels Exp $
+ * $Id: net_db.cc,v 1.118 1998/07/20 19:25:36 wessels Exp $
  *
  * DEBUG: section 37    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -1052,10 +1052,6 @@ netdbExchangeStart(void *data)
     }
     requestLink(ex->r);
     assert(NULL != ex->r);
-#if OLD_CODE
-    ex->r->headers = xstrdup("\r\n");
-    ex->r->headers_sz = strlen(ex->r->headers);
-#endif
     ex->r->http_ver = 1.0;
     ex->e = storeCreateEntry(uri, uri, 0, METHOD_GET);
     ex->buf_sz = 4096;;
index 93258308c23eedb617adcbc08a7ceb1d9633c435..5ab73bc7e7a557ba647e5a4de785a429906eaeda 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_digest.cc,v 1.41 1998/07/20 17:19:58 wessels Exp $
+ * $Id: peer_digest.cc,v 1.42 1998/07/20 19:25:37 wessels Exp $
  *
  * DEBUG: section 72    Peer Digest Routines
  * AUTHOR: Alex Rousskov
@@ -249,21 +249,9 @@ peerDigestRequest(peer * p)
     requestLink(req);
     assert(req);
     /* add custom headers */
-#if OLD_CODE
-    /* rewrite this when requests get rid of "prefix" */
-    assert(!req->prefix);
-    {
-       MemBuf mb;
-       memBufDefInit(&mb);
-       memBufPrintf(&mb, "Accept: %s,text/html\r\n", StoreDigestMimeStr);
-       httpRequestSetHeaders(req, METHOD_GET, url, mb.buf);
-       memBufClean(&mb);
-    }
-#else
     assert(!req->header.len);
     httpHeaderPutStr(&req->header, HDR_ACCEPT, StoreDigestMimeStr);
     httpHeaderPutStr(&req->header, HDR_ACCEPT, "text/html");
-#endif
     /* create fetch state structure */
     fetch = memAllocate(MEM_DIGEST_FETCH_STATE);
     cbdataAdd(fetch, MEM_DIGEST_FETCH_STATE);
index 57a5df8ae5d841987be4162bc5215c9bca85ed50..fe1e71253704fdd4f17c9c71e3edc17292b16aeb 100644 (file)
@@ -511,9 +511,6 @@ extern void memBufReport(MemBuf * mb);
 
 extern char *mime_get_header(const char *mime, const char *header);
 extern char *mime_get_header_field(const char *mime, const char *name, const char *prefix);
-#if OLD_CODE
-extern char *mime_headers_end(const char *mime);
-#endif
 extern size_t headersEnd(const char *, size_t);
 extern const char *mime_get_auth(const char *hdr, const char *auth_scheme, const char **auth_field);
 
index b5be9134781fa20ab84f11473341b320d5ecdae5..bb478467b9fd3a3a816f494075c1b29ae84ddc59 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.cc,v 1.72 1998/07/20 17:20:16 wessels Exp $
+ * $Id: store_dir.cc,v 1.73 1998/07/20 19:25:40 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -217,29 +217,6 @@ storeCreateSwapSubDirs(int j)
     }
 }
 
-#if OLD_CODE
-static int
-storeMostFreeSwapDir(void)
-{
-    double least_used = 1.0;
-    double this_used;
-    int dirn = 0;
-    int i;
-    SwapDir *SD;
-    for (i = 0; i < Config.cacheSwap.n_configured; i++) {
-       SD = &Config.cacheSwap.swapDirs[i];
-       this_used = (double) SD->cur_size / SD->max_size;
-       if (this_used > least_used)
-           continue;
-       if (SD->read_only)
-           continue;
-       least_used = this_used;
-       dirn = i;
-    }
-    return dirn;
-}
-#endif
-
 /*
  *Spread load across least 3/4 of the store directories
  */
index e0483a62b4fd1b8d11398a80cc8c2ff7a7f3f781..d1f28ee083d080e85a0d6cbe1a56701f754673bd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.101 1998/07/20 17:20:20 wessels Exp $
+ * $Id: url.cc,v 1.102 1998/07/20 19:25:41 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -333,35 +333,6 @@ urlCanonicalClean(const request_t * request)
     return buf;
 }
 
-#if OLD_CODE                   /* moved to HttpRequest.c */
-request_t *
-requestLink(request_t * request)
-{
-    request->link_count++;
-    return request;
-}
-
-void
-requestUnlink(request_t * request)
-{
-    if (request == NULL)
-       return;
-    request->link_count--;
-    if (request->link_count)
-       return;
-#if OLD_CODE
-    safe_free(request->headers);
-#else
-    httpHeaderClean(&request->header);
-    safe_free(request->prefix);
-#endif
-    safe_free(request->body);
-    stringClean(&request->urlpath);
-    safe_free(request->canonical);
-    memFree(MEM_REQUEST_T, request);
-}
-#endif
-
 int
 matchDomainName(const char *domain, const char *host)
 {
index bdac4ae2048b999b0a28e561e4c0b264f20519ba..b7d5b9acf2e5f63a5429bf713a375caed7cddb6a 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *
- * $Id: urn.cc,v 1.38 1998/07/20 17:20:21 wessels Exp $
+ * $Id: urn.cc,v 1.39 1998/07/20 19:25:42 wessels Exp $
  *
  * DEBUG: section 52    URN Parsing
  * AUTHOR: Kostas Anagnostakis
@@ -134,12 +134,7 @@ urnStart(request_t * r, StoreEntry * e)
        errorAppendEntry(e, err);
        return;
     }
-#if OLD_CODE
-    urlres_r->headers = xstrdup("Accept: text/plain\r\n\r\n");
-    urlres_r->headers_sz = strlen(urlres_r->headers);
-#else
     httpHeaderPutStr(&urlres_r->header, HDR_ACCEPT, "text/plain");
-#endif
     if ((urlres_e = storeGet(k)) == NULL) {
        urlres_e = storeCreateEntry(urlres, urlres, 0, METHOD_GET);
        storeClientListAdd(urlres_e, urnState);
index 9049ca44a95f2612fa8bb55193c5e425716910f7..6fd5745023734f141d0ea5cf75db98ca47ae8b7c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: wais.cc,v 1.112 1998/07/20 17:20:23 wessels Exp $
+ * $Id: wais.cc,v 1.113 1998/07/20 19:25:43 wessels Exp $
  *
  * DEBUG: section 24    WAIS Relay
  * AUTHOR: Harvest Derived
@@ -121,9 +121,6 @@ static PF waisTimeout;
 static PF waisReadReply;
 static CWCB waisSendComplete;
 static PF waisSendRequest;
-#if OLD_CODE
-static STABH waisAbort;
-#endif
 
 static void
 waisStateFree(int fdnotused, void *data)
@@ -131,9 +128,6 @@ waisStateFree(int fdnotused, void *data)
     WaisStateData *waisState = data;
     if (waisState == NULL)
        return;
-#if OLD_CODE
-    storeUnregisterAbort(waisState->entry);
-#endif
     storeUnlockObject(waisState->entry);
     cbdataFree(waisState);
 }
@@ -268,28 +262,9 @@ static void
 waisSendRequest(int fd, void *data)
 {
     WaisStateData *waisState = data;
-#if OLD_CODE
-    int len = strlen(waisState->request) + 4;
-    char *buf = NULL;
-#else
     MemBuf mb;
-#endif
     const char *Method = RequestMethodStr[waisState->method];
     debug(24, 5) ("waisSendRequest: FD %d\n", fd);
-#if OLD_CODE
-    if (Method)
-       len += strlen(Method);
-    if (waisState->request_hdr)
-       len += strlen(waisState->request_hdr);
-    buf = xcalloc(1, len + 1);
-    if (waisState->request_hdr)
-       snprintf(buf, len + 1, "%s %s %s\r\n", Method, waisState->request,
-           waisState->request_hdr);
-    else
-       snprintf(buf, len + 1, "%s %s\r\n", Method, waisState->request);
-    debug(24, 6) ("waisSendRequest: buf: %s\n", buf);
-    comm_write(fd, buf, len, waisSendComplete, waisState, xfree);
-#else
     memBufPrintf(&mb, "%s %s", Method, waisState->request);
     if (waisState->request_hdr) {
        Packer p;
@@ -300,7 +275,6 @@ waisSendRequest(int fd, void *data)
     memBufPrintf(&mb, "\r\n");
     debug(24, 6) ("waisSendRequest: buf: %s\n", mb.buf);
     comm_write_mbuf(fd, mb, waisSendComplete, waisState);
-#endif
     if (EBIT_TEST(waisState->entry->flag, ENTRY_CACHABLE))
        storeSetPublicKey(waisState->entry);    /* Make it public */
 }
@@ -332,20 +306,7 @@ waisStart(request_t * request, StoreEntry * entry, int fd)
     waisState->entry = entry;
     xstrncpy(waisState->request, url, MAX_URL);
     comm_add_close_handler(waisState->fd, waisStateFree, waisState);
-#if OLD_CODE
-    storeRegisterAbort(entry, waisAbort, waisState);
-#endif
     storeLockObject(entry);
     commSetSelect(fd, COMM_SELECT_WRITE, waisSendRequest, waisState, 0);
     commSetTimeout(fd, Config.Timeout.read, waisTimeout, waisState);
 }
-
-#if OLD_CODE
-static void
-waisAbort(void *data)
-{
-    HttpStateData *waisState = data;
-    debug(24, 1) ("waisAbort: %s\n", storeUrl(waisState->entry));
-    comm_close(waisState->fd);
-}
-#endif