This is an automated email from the ASF dual-hosted git repository.
jacksontj pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new a075556 TS-4720 correctly check if requests have a body
new cf3913e Merge pull request #841 from jacksontj/TS-4720
a075556 is described below
commit a075556602d77d79f5a02e2a36053abfa92703f0
Author: Thomas Jackson <[email protected]>
AuthorDate: Thu Aug 4 17:55:59 2016 -0700
TS-4720 correctly check if requests have a body
HttpTransact defaults content length to `-1`, meaning that if the request
has no content length header it will be `-1`. These checks weren't taking that
into consideration -- meaning client aborts during requests with no content
length (GET for example) would leave the origin session open until another
timeout kicked in.
---
proxy/http/HttpSM.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index b21ac3d..26508c7 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -803,7 +803,7 @@ HttpSM::state_read_client_request_header(int event, void
*data)
}
if (t_state.hdr_info.client_request.method_get_wksidx() ==
HTTP_WKSIDX_TRACE ||
- (t_state.hdr_info.request_content_length == 0 &&
t_state.client_info.transfer_encoding != HttpTransact::CHUNKED_ENCODING)) {
+ (t_state.hdr_info.request_content_length <= 0 &&
t_state.client_info.transfer_encoding != HttpTransact::CHUNKED_ENCODING)) {
// Enable further IO to watch for client aborts
ua_entry->read_vio->reenable();
} else {
@@ -5191,7 +5191,7 @@ HttpSM::mark_server_down_on_client_abort()
// that upstream proxy may be working but //
// the actual origin server is one that is hung //
/////////////////////////////////////////////////////
- if (t_state.current.request_to == HttpTransact::ORIGIN_SERVER &&
t_state.hdr_info.request_content_length == 0) {
+ if (t_state.current.request_to == HttpTransact::ORIGIN_SERVER &&
t_state.hdr_info.request_content_length <= 0) {
if (milestones[TS_MILESTONE_SERVER_FIRST_CONNECT] != 0 &&
milestones[TS_MILESTONE_SERVER_FIRST_READ] == 0) {
// Check to see if client waited for the threshold
// to declare the origin server as down
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].