[ 
https://issues.apache.org/jira/browse/TS-4720?focusedWorklogId=32335&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-32335
 ]

ASF GitHub Bot logged work on TS-4720:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Nov/16 21:59
            Start Date: 22/Nov/16 21:59
    Worklog Time Spent: 10m 
      Work Description: GitHub user PSUdaemon opened a pull request:

    https://github.com/apache/trafficserver/pull/1231

    TS-4720 back port

    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.
    
    (cherry picked from commit a075556602d77d79f5a02e2a36053abfa92703f0)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/PSUdaemon/trafficserver ts-4720-cp

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/1231.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1231
    
----
commit a17b851427696aa40b3ade46d66a1235f6bef9f9
Author: Thomas Jackson <jacksontj...@gmail.com>
Date:   2016-08-05T00:55:59Z

    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.
    
    (cherry picked from commit a075556602d77d79f5a02e2a36053abfa92703f0)

----


Issue Time Tracking
-------------------

    Worklog Id:     (was: 32335)
    Time Spent: 1h 10m  (was: 1h)

> ATS not properly closing origin connections in client abort situations
> ----------------------------------------------------------------------
>
>                 Key: TS-4720
>                 URL: https://issues.apache.org/jira/browse/TS-4720
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>            Reporter: Thomas Jackson
>            Assignee: Thomas Jackson
>             Fix For: 7.0.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> We've noticed that there are some scenarios that ATS doesn't close the origin 
> connection when the client aborts. To reproduce I set up an http server which 
> would return a text/stream sending a message every 10s. In this case, if I do 
> a GET request to the endpoint and then immediately kill the client, the 
> connection to the origin doesn't close until the transaction active timer 
> kicks in. 
> After digging into this, it seems that this is actually due to a bug in the 
> HttpSM-- specifically in how it checks whether a request has a body. The 
> default value for content-length is `-1`, but some checks are `== 0` -- which 
> means that if the request had no content-length header it is treated as a 
> request with a content-length. 
> The particular place that was problematic was the section that enables the 
> vio reader to watch for client aborts-- which specifically isn't enabled for 
> POST/chunked requests as it is enabled later down the call chain (since it 
> needs to handle the buffers itself).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to