This repository was archived by the owner on Feb 10, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -429,8 +429,13 @@ std::string HTTPClientSession::proxyRequestPrefix() const
429
429
{
430
430
std::string result (" http://" );
431
431
result.append (_host);
432
- result.append (" :" );
433
- NumberFormatter::append (result, _port);
432
+ // / Do not append default by default, since this may break some servers.
433
+ // / One example of such server is GCS (Google Cloud Storage).
434
+ if (_port != HTTPSession::HTTP_PORT)
435
+ {
436
+ result.append (" :" );
437
+ NumberFormatter::append (result, _port);
438
+ }
434
439
return result;
435
440
}
436
441
Original file line number Diff line number Diff line change @@ -138,8 +138,13 @@ std::string HTTPSClientSession::proxyRequestPrefix() const
138
138
{
139
139
std::string result (" https://" );
140
140
result.append (getHost ());
141
- result.append (" :" );
142
- NumberFormatter::append (result, getPort ());
141
+ // / Do not append default by default, since this may break some servers.
142
+ // / One example of such server is GCS (Google Cloud Storage).
143
+ if (getPort () != HTTPS_PORT)
144
+ {
145
+ result.append (" :" );
146
+ NumberFormatter::append (result, getPort ());
147
+ }
143
148
return result;
144
149
}
145
150
You can’t perform that action at this time.
0 commit comments