Repository: trafficserver
Updated Branches:
  refs/heads/master 1702d4c7e -> 269a75bf4


[TS-3060] : update doc, add connection:close header


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/269a75bf
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/269a75bf
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/269a75bf

Branch: refs/heads/master
Commit: 269a75bf4f988ac7c597b10c5455a91776485e71
Parents: 1702d4c
Author: Sudheer Vinukonda <[email protected]>
Authored: Fri Oct 10 16:44:18 2014 +0000
Committer: Sudheer Vinukonda <[email protected]>
Committed: Fri Oct 10 16:44:18 2014 +0000

----------------------------------------------------------------------
 doc/reference/configuration/records.config.en.rst | 4 ++++
 proxy/http/HttpSM.cc                              | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/269a75bf/doc/reference/configuration/records.config.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/configuration/records.config.en.rst 
b/doc/reference/configuration/records.config.en.rst
index f4b3a91..486a58c 100644
--- a/doc/reference/configuration/records.config.en.rst
+++ b/doc/reference/configuration/records.config.en.rst
@@ -776,6 +776,10 @@ specific domains.
    Controls wether new POST requests re-use keep-alive sessions (``1``) or
    create new connections per request (``0``).
 
+.. ts:cv:: CONFIG proxy.config.http.send_408_post_timeout_response INT 0
+
+   Controls wether POST timeout sends a HTTP status 408 response (``1``)
+
 
 Parent Proxy Configuration
 ==========================

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/269a75bf/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 8abea10..1771339 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -96,7 +96,7 @@ static const int boundary_size = 2 + 
sizeof("RANGE_SEPARATOR") - 1 + 2;
 static const char *str_100_continue_response = "HTTP/1.1 100 Continue\r\n\r\n";
 static const int len_100_continue_response = strlen(str_100_continue_response);
 
-static const char *str_408_request_timeout_response = "HTTP/1.1 408 Request 
Timeout\r\n\r\n";
+static const char *str_408_request_timeout_response = "HTTP/1.1 408 Request 
Timeout\r\nConnection: close\r\n\r\n";
 static const int  len_408_request_timeout_response = 
strlen(str_408_request_timeout_response);
 
 /**
@@ -2651,7 +2651,7 @@ HttpSM::tunnel_handler_post(int event, void *data)
 
   HttpTunnelProducer *p = tunnel.get_producer(ua_session);
   if (event != HTTP_TUNNEL_EVENT_DONE) {
-    if (t_state.http_config_param->send_408_request_timeout_response) {
+    if (t_state.http_config_param->send_408_post_timeout_response) {
       Debug("http_tunnel", "cleanup tunnel in tunnel_handler_post");
       ink_assert((event == VC_EVENT_WRITE_COMPLETE) || (event == 
VC_EVENT_EOS));
       free_MIOBuffer(ua_entry->write_buffer);
@@ -3358,7 +3358,7 @@ HttpSM::tunnel_handler_post_ua(int event, 
HttpTunnelProducer * p)
     //   server and close the ua
     p->handler_state = HTTP_SM_POST_UA_FAIL;
 
-    if (t_state.http_config_param->send_408_request_timeout_response && 
client_response_hdr_bytes == 0) {
+    if (t_state.http_config_param->send_408_post_timeout_response && 
client_response_hdr_bytes == 0) {
       switch (event) {
         case VC_EVENT_ERROR:
           HttpTransact::build_error_response(&t_state, 
HTTP_STATUS_INTERNAL_SERVER_ERROR, "POST Error", "default", NULL);

Reply via email to