diff options
author | Dominique Leuenberger <dimstar@opensuse.org> | 2022-03-30 18:17:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 18:17:48 +0200 |
commit | 082a8beaf70592c82d49d49701da1ec34d274b0d (patch) | |
tree | 10bcc42aa6177ff04a6c28ac64b44d41fb4b70dc | |
parent | 0272815988a139de8920e65296ebc75b4a0a8e24 (diff) | |
parent | b43d394f76bf85c41c1d9967ae180e525724bdd4 (diff) | |
download | libproxy-git-082a8beaf70592c82d49d49701da1ec34d274b0d.tar.gz |
Merge pull request #165 from janbrummer/add-host-port
Add host port to request header
-rw-r--r-- | libproxy/url.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libproxy/url.cpp b/libproxy/url.cpp index 76ae47f..6925745 100644 --- a/libproxy/url.cpp +++ b/libproxy/url.cpp @@ -457,7 +457,7 @@ char* url::get_pac() { // Build the request string request = "GET " + (m_path.size() > 0 ? m_path : "/") + m_query + " HTTP/1.1\r\n"; - request += "Host: " + m_host + "\r\n"; + request += "Host: " + m_host + (m_port != 80 ? ":" + std::to_string(m_port) : "") + "\r\n"; request += "Accept: " + string(PAC_MIME_TYPE) + "\r\n"; request += "Connection: close\r\n"; request += "\r\n"; |