From 3dcc4fbf1857666dacb8b72182e95abba2a45bd1 Mon Sep 17 00:00:00 2001 From: "mbelshe@google.com" Date: Tue, 10 Nov 2009 01:35:06 +0000 Subject: 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 --- net/flip/flip_network_transaction_unittest.cc | 29 ++++++++++++--------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'net/flip/flip_network_transaction_unittest.cc') 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', }; -- cgit v1.1