spdycat: Don't include port in host header field if port == 443.
Added accept header field. Use SPDYLAY_VERSION in user-agent header field. Some sites do not like 443 is in host header field.
This commit is contained in:
parent
d05d29b507
commit
2568fb95b6
|
@ -180,7 +180,9 @@ int communicate(const std::string& host, uint16_t port,
|
|||
if(reqvec[0].us.ipv6LiteralAddress) {
|
||||
ss << "]";
|
||||
}
|
||||
if(port != 443) {
|
||||
ss << ":" << port;
|
||||
}
|
||||
std::string hostport = ss.str();
|
||||
|
||||
for(int i = 0, n = reqvec.size(); i < n; ++i) {
|
||||
|
|
|
@ -116,7 +116,8 @@ int Spdylay::submit_request(const std::string& hostport,
|
|||
":version", "HTTP/1.1",
|
||||
":scheme", "https",
|
||||
":host", hostport.c_str(),
|
||||
"user-agent", "spdylay/0.0.0",
|
||||
"accept", "*/*",
|
||||
"user-agent", "spdylay/"SPDYLAY_VERSION,
|
||||
NULL
|
||||
};
|
||||
return spdylay_submit_request(session_, pri, nv, NULL, stream_user_data);
|
||||
|
|
Loading…
Reference in New Issue