From: wessels <> Date: Tue, 9 Dec 1997 11:13:04 +0000 (+0000) Subject: menu hack fix X-Git-Tag: SQUID_3_0_PRE1~4360 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de28f103e78d44a4f4f5221fb20dad8cf063540b;p=thirdparty%2Fsquid.git menu hack fix --- diff --git a/src/urn.cc b/src/urn.cc index 0f065e1d9f..69c5da0c7e 100644 --- a/src/urn.cc +++ b/src/urn.cc @@ -99,6 +99,12 @@ urnStart(request_t *r, StoreEntry *e) urnState->request = requestLink(r); cbdataAdd(urnState); storeLockObject(urnState->entry); + if (strncasecmp(r->urlpath, "menu.", 5) == 0) { + EBIT_SET(urnState->flags, URN_FORCE_MENU); + t = xstrdup(r->urlpath + 5); + xstrncpy(r->urlpath, t, MAX_URL); + xfree(t); + } if ((t = strchr(r->urlpath, ':')) != NULL) { *t = '\0'; host = xstrdup(r->urlpath); @@ -106,12 +112,6 @@ urnStart(request_t *r, StoreEntry *e) } else { host = xstrdup(r->urlpath); } - if (strncasecmp(host, "menu.", 5) == 0) { - EBIT_SET(urnState->flags, URN_FORCE_MENU); - t = xstrdup(host + 5); - xfree(host); - host = t; - } snprintf(urlres, 4096, "http://%s/uri-res/N2L?urn:%s", host, r->urlpath); safe_free(host); k = storeKeyPublic(urlres, METHOD_GET);