diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 01:35:06 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 01:35:06 +0000 |
commit | 3dcc4fbf1857666dacb8b72182e95abba2a45bd1 (patch) | |
tree | 8252a666b9775c53fdfc7ff2e9063e60f5826f7c /net/flip | |
parent | 71c012ae753d7f428e83cd4866a5516fc8c58b82 (diff) | |
download | chromium_src-3dcc4fbf1857666dacb8b72182e95abba2a45bd1.zip chromium_src-3dcc4fbf1857666dacb8b72182e95abba2a45bd1.tar.gz chromium_src-3dcc4fbf1857666dacb8b72182e95abba2a45bd1.tar.bz2 |
Switch chrome to requesting full-urls over FLIP rather than
URIs. This is so that the protocol (http/https) can be conveyed
directly from the client. This makes the host header irrelevant.
Will update the spec.
Updated the unit tests to reflect the host header removal.
TEST=flip_network_transaction_unittest.cc
BUG=none
Review URL: http://codereview.chromium.org/379011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31530 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/flip')
-rw-r--r-- | net/flip/flip_network_transaction_unittest.cc | 29 | ||||
-rw-r--r-- | net/flip/flip_session.cc | 3 |
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()) |