|
|
@ -223,14 +223,13 @@ namespace proxy { |
|
|
|
u.parse(t); |
|
|
|
u.parse(t); |
|
|
|
dest_host = u.host; |
|
|
|
dest_host = u.host; |
|
|
|
dest_port = u.port; |
|
|
|
dest_port = u.port; |
|
|
|
if (dest_port == 0) |
|
|
|
|
|
|
|
dest_port = 80; /* always set port for CreateStream() */ |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
/* relative url and missing 'Host' header */ |
|
|
|
/* relative url and missing 'Host' header */ |
|
|
|
std::string message = "Can't detect destination host from request"; |
|
|
|
std::string message = "Can't detect destination host from request"; |
|
|
|
HTTPRequestFailed(message.c_str()); |
|
|
|
HTTPRequestFailed(message.c_str()); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!dest_port) dest_port = 80; /* always set port for CreateStream() */ //TODO: 443 for https
|
|
|
|
/* make relative url */ |
|
|
|
/* make relative url */ |
|
|
|
url.schema = ""; |
|
|
|
url.schema = ""; |
|
|
|
url.host = ""; |
|
|
|
url.host = ""; |
|
|
|