diff options
author | Harald Musum <musum@verizonmedia.com> | 2019-03-25 19:44:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-25 19:44:33 +0100 |
commit | 9657bd8a8e11095c1ccae26d5670187ab73c9bfd (patch) | |
tree | 18e625aeca0bfeab2918094156a82535322cb29c | |
parent | 8533c200eaba6f2573228509e5eae5eb036b282f (diff) |
Revert "include content length in http response"
4 files changed, 1 insertions, 7 deletions
diff --git a/staging_vespalib/src/tests/state_server/state_server_test.cpp b/staging_vespalib/src/tests/state_server/state_server_test.cpp index d4071526a79..d4f665029cc 100644 --- a/staging_vespalib/src/tests/state_server/state_server_test.cpp +++ b/staging_vespalib/src/tests/state_server/state_server_test.cpp @@ -81,7 +81,6 @@ TEST_FF("require that non-empty known url returns expected headers", DummyHandle vespalib::string expect("HTTP/1.1 200 OK\r\n" "Connection: close\r\n" "Content-Type: application/json\r\n" - "Content-Length: 5\r\n" "\r\n" "[123]"); std::string actual = getFull(f2.port(), my_path); diff --git a/storage/src/tests/frameworkimpl/status/statustest.cpp b/storage/src/tests/frameworkimpl/status/statustest.cpp index 9e5a87e8783..b047a4000cf 100644 --- a/storage/src/tests/frameworkimpl/status/statustest.cpp +++ b/storage/src/tests/frameworkimpl/status/statustest.cpp @@ -130,7 +130,6 @@ StatusTest::testIndexStatusPage() "HTTP\\/1.1 200 OK\r\n" "Connection: close\r\n" "Content-Type: text\\/html\r\n" - "Content-Length: 206\r\n" "\r\n" "<html>\n" "<head>\n" @@ -161,7 +160,6 @@ StatusTest::testHtmlStatus() "HTTP/1.1 200 OK\r\n" "Connection: close\r\n" "Content-Type: text/html\r\n" - "Content-Length: 117\r\n" "\r\n" "<html>\n" "<head>\n" @@ -189,7 +187,6 @@ StatusTest::testXmlStatus() "HTTP/1.1 200 OK\r\n" "Connection: close\r\n" "Content-Type: application/xml\r\n" - "Content-Length: 100\r\n" "\r\n" "<?xml version=\"1.0\"?>\n" "<status id=\"fooid\" name=\"Foo impl\">\n" diff --git a/vespalib/src/tests/portal/portal_test.cpp b/vespalib/src/tests/portal/portal_test.cpp index 1baebc69e97..ee5d10a313a 100644 --- a/vespalib/src/tests/portal/portal_test.cpp +++ b/vespalib/src/tests/portal/portal_test.cpp @@ -47,9 +47,8 @@ vespalib::string make_expected_response(const vespalib::string &content_type, co return vespalib::make_string("HTTP/1.1 200 OK\r\n" "Connection: close\r\n" "Content-Type: %s\r\n" - "Content-Length: %zu\r\n" "\r\n" - "%s", content_type.c_str(), content.size(), content.c_str()); + "%s", content_type.c_str(), content.c_str()); } vespalib::string make_expected_error(int code, const vespalib::string &message) { diff --git a/vespalib/src/vespa/vespalib/portal/http_connection.cpp b/vespalib/src/vespa/vespalib/portal/http_connection.cpp index 97a5f6082c9..cfee71e4a7d 100644 --- a/vespalib/src/vespa/vespalib/portal/http_connection.cpp +++ b/vespalib/src/vespa/vespalib/portal/http_connection.cpp @@ -222,7 +222,6 @@ HttpConnection::respond_with_content(const vespalib::string &content_type, dst.printf("HTTP/1.1 200 OK\r\n"); dst.printf("Connection: close\r\n"); dst.printf("Content-Type: %s\r\n", content_type.c_str()); - dst.printf("Content-Length: %zu\r\n", content.size()); dst.printf("\r\n"); dst.write(content.data(), content.size()); } |