summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/flip/flip_network_transaction_unittest.cc29
-rw-r--r--net/flip/flip_session.cc3
2 files changed, 14 insertions, 18 deletions
diff --git a/net/flip/flip_network_transaction_unittest.cc b/net/flip/flip_network_transaction_unittest.cc
index 69eb6c0..c60ccdb 100644
--- a/net/flip/flip_network_transaction_unittest.cc
+++ b/net/flip/flip_network_transaction_unittest.cc
@@ -197,16 +197,15 @@ TEST_F(FlipNetworkTransactionTest, Constructor) {
TEST_F(FlipNetworkTransactionTest, Get) {
static const unsigned char syn[] = {
0x80, 0x01, 0x00, 0x01, // header
- 0x01, 0x00, 0x00, 0x46, // FIN, len
+ 0x01, 0x00, 0x00, 0x45, // FIN, len
0x00, 0x00, 0x00, 0x01, // stream id
- 0xc0, 0x00, 0x00, 0x04, // 4 headers
- 0x00, 0x04, 'h', 'o', 's', 't',
- 0x00, 0x0e, 'w', 'w', 'w', '.', 'g', 'o', 'o', 'g', 'l', 'e',
- '.', 'c', 'o', 'm',
+ 0xc0, 0x00, 0x00, 0x03, // 4 headers
0x00, 0x06, 'm', 'e', 't', 'h', 'o', 'd',
0x00, 0x03, 'G', 'E', 'T',
0x00, 0x03, 'u', 'r', 'l',
- 0x00, 0x01, '/',
+ 0x00, 0x16, 'h', 't', 't', 'p', ':', '/', '/', 'w', 'w', 'w',
+ '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o',
+ 'm', '/',
0x00, 0x07, 'v', 'e', 'r', 's', 'i', 'o', 'n',
0x00, 0x08, 'H', 'T', 'T', 'P', '/', '1', '.', '1',
};
@@ -278,13 +277,12 @@ TEST_F(FlipNetworkTransactionTest, Post) {
// 0x01, 0x00, 0x00, 0x46, // FIN, len
// 0x00, 0x00, 0x00, 0x01, // stream id
// 0xc0, 0x00, 0x00, 0x04, // 4 headers
- // 0x00, 0x04, 'h', 'o', 's', 't',
- // 0x00, 0x0e, 'w', 'w', 'w', '.', 'g', 'o', 'o', 'g', 'l', 'e',
- // '.', 'c', 'o', 'm',
// 0x00, 0x06, 'm', 'e', 't', 'h', 'o', 'd',
// 0x00, 0x03, 'G', 'E', 'T',
// 0x00, 0x03, 'u', 'r', 'l',
- // 0x00, 0x01, '/',
+ // 0x00, 0x16, 'h', 't', 't', 'p', ':', '/', '/', 'w', 'w', 'w',
+ // '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o',
+ // 'm', '/',
// 0x00, 0x07, 'v', 'e', 'r', 's', 'i', 'o', 'n',
// 0x00, 0x08, 'H', 'T', 'T', 'P', '/', '1', '.', '1',
//};
@@ -377,16 +375,15 @@ TEST_F(FlipNetworkTransactionTest, ResponseWithoutSynReply) {
TEST_F(FlipNetworkTransactionTest, DISABLED_CancelledTransaction) {
static const unsigned char syn[] = {
0x80, 0x01, 0x00, 0x01, // header
- 0x01, 0x00, 0x00, 0x46, // FIN, len
+ 0x01, 0x00, 0x00, 0x45, // FIN, len
0x00, 0x00, 0x00, 0x01, // stream id
- 0xc0, 0x00, 0x00, 0x04, // 4 headers
- 0x00, 0x04, 'h', 'o', 's', 't',
- 0x00, 0x0e, 'w', 'w', 'w', '.', 'g', 'o', 'o', 'g', 'l', 'e',
- '.', 'c', 'o', 'm',
+ 0xc0, 0x00, 0x00, 0x03, // 4 headers
0x00, 0x06, 'm', 'e', 't', 'h', 'o', 'd',
0x00, 0x03, 'G', 'E', 'T',
0x00, 0x03, 'u', 'r', 'l',
- 0x00, 0x01, '/',
+ 0x00, 0x16, 'h', 't', 't', 'p', ':', '/', '/', 'w', 'w', 'w',
+ '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o',
+ 'm', '/',
0x00, 0x07, 'v', 'e', 'r', 's', 'i', 'o', 'n',
0x00, 0x08, 'H', 'T', 'T', 'P', '/', '1', '.', '1',
};
diff --git a/net/flip/flip_session.cc b/net/flip/flip_session.cc
index 1f594eb..9e2ad0d 100644
--- a/net/flip/flip_session.cc
+++ b/net/flip/flip_session.cc
@@ -105,9 +105,8 @@ void CreateFlipHeadersFromHttpRequest(
}
(*headers)["method"] = info->method;
- (*headers)["url"] = info->url.PathForRequest();
+ (*headers)["url"] = info->url.spec();
(*headers)["version"] = kHttpProtocolVersion;
- (*headers)["host"] = GetHostAndOptionalPort(info->url);
if (info->user_agent.length())
(*headers)["user-agent"] = info->user_agent;
if (!info->referrer.is_empty())