Revert "Issue 167: Accept connections in subfolders"
This reverts commit 1139b09b62
.
o Revert this commit in order to revise it.
This commit is contained in:
parent
33a92e9c93
commit
55ca3e827c
1 changed files with 10 additions and 8 deletions
|
@ -613,15 +613,17 @@ static int shellInABoxHttpHandler(HttpConnection *http, void *arg,
|
||||||
const HashMap *headers = httpGetHeaders(http);
|
const HashMap *headers = httpGetHeaders(http);
|
||||||
const char *contentType = getFromHashMap(headers, "content-type");
|
const char *contentType = getFromHashMap(headers, "content-type");
|
||||||
|
|
||||||
// Normalize the path info, present the final path element
|
// Normalize the path info
|
||||||
const char *pathInfo = urlGetPathInfo(url);
|
const char *pathInfo = urlGetPathInfo(url);
|
||||||
int pathInfoLength = 0;
|
while (*pathInfo == '/') {
|
||||||
pathInfo = rindex (pathInfo, '/');
|
pathInfo++;
|
||||||
if (pathInfo)
|
}
|
||||||
++pathInfo;
|
const char *endPathInfo;
|
||||||
else
|
for (endPathInfo = pathInfo;
|
||||||
pathInfo = ""; /* Cheap way to get an empty string */
|
*endPathInfo && *endPathInfo != '/';
|
||||||
pathInfoLength = strlen (pathInfo);
|
endPathInfo++) {
|
||||||
|
}
|
||||||
|
int pathInfoLength = endPathInfo - pathInfo;
|
||||||
|
|
||||||
if (!pathInfoLength ||
|
if (!pathInfoLength ||
|
||||||
(pathInfoLength == 5 && !memcmp(pathInfo, "plain", 5)) ||
|
(pathInfoLength == 5 && !memcmp(pathInfo, "plain", 5)) ||
|
||||||
|
|
Loading…
Reference in a new issue