summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2019-03-25 19:44:33 +0100
committerGitHub <noreply@github.com>2019-03-25 19:44:33 +0100
commit9657bd8a8e11095c1ccae26d5670187ab73c9bfd (patch)
tree18e625aeca0bfeab2918094156a82535322cb29c /vespalib
parent8533c200eaba6f2573228509e5eae5eb036b282f (diff)
Revert "include content length in http response"
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/portal/portal_test.cpp3
-rw-r--r--vespalib/src/vespa/vespalib/portal/http_connection.cpp1
2 files changed, 1 insertions, 3 deletions
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());
}