Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/redir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,13 +2125,15 @@ static int redir_getreq(struct redir_t *redir, struct redir_socket_t *sock,

while (*p1 == ' ') p1++; /* Advance through additional white space */

/* A proxy request, skip over the initial URL */
if (!strncmp(p1, "http://", 7) && strlen(p1) > 8) {
/*
* A proxy request, skip over the initial URL
*/
p1 += 7;
while (*p1 && *p1 != '/') p1++;
}
else if (!strncmp(p1, "https://", 8) && strlen(p1) > 9) {
p1 += 8;
while (*p1 && *p1 != '/') p1++;
}

if (*p1 == '/') p1++;
else { syslog(LOG_ERR, "parse error"); return -1; }
Expand Down