[ 
https://issues.apache.org/jira/browse/TS-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13959060#comment-13959060
 ] 

James Peach commented on TS-2678:
---------------------------------

This is breaking because {{HttpSM::is_http_server_eos_truncation}} thinks that 
this is a response truncation. Interestingly, the {{Content-Length}} header 
handling towards the end of {{HttpSM::is_http_server_eos_truncation}} would get 
this case correct because it the absence of a {{Content-Length}} header would 
cause it to return false (ie. that the request is not truncated).

{{HttpSM::is_http_server_eos_truncation}} in this case returns true because the 
{{t_state.current.server->keep_alive == HTTP_KEEPALIVE}} condition succeeds.

The chunk handling condition is also correct for this case (ie. it would 
evaluate to false):
{code}
   2724   if ((p->do_dechunking || p->do_chunked_passthru) && 
p->chunked_handler.truncation) {
(lldb) p t_state.current.server->keep_alive
(HTTPKeepAlive) $0 = HTTP_KEEPALIVE
(lldb) p *p
(HttpTunnelProducer) $1 = {
  ...
  chunked_handler = {
    ...
    truncation = false
    ...
  }
  chunking_action = TCA_CHUNK_CONTENT
  do_chunking = true
  do_dechunking = false
  do_chunked_passthru = false
  ...
}
{code}

The keep alive condition has been there since the beginning of source history. 
I'm not sure that check is appropriate, but I need to research how 
{{ConnectionAttributes::keep_alive}} is actually used.

> Some sites (e.g. craigslist) fails to load with patch in e6b9cb533bba28
> -----------------------------------------------------------------------
>
>                 Key: TS-2678
>                 URL: https://issues.apache.org/jira/browse/TS-2678
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>            Reporter: Leif Hedstrom
>            Assignee: James Peach
>            Priority: Critical
>             Fix For: 5.0.0
>
>
> The commit e6b9cb533bba28, from
> TS-2559: Disconnect clients on unrecoverable origin errors
> is causing some sites to break badly:
> {code}
> curl: (52) Empty reply from server
> {code}
> or sometimes
> {code}
> HTTP/1.1 302 Found
> Location: http://www.craigslist.org/
> Date: Mon, 31 Mar 2014 02:36:51 GMT
> Age: 0
> Transfer-Encoding: chunked
> Proxy-Connection: keep-alive
> Server: ATS/5.0.0
> curl: (18) transfer closed with outstanding read data remaining
> {code}
> The first one happens most frequently in my test, and the second one is close 
> to what is expected (but not quite). Both makes the page not load properly 
> from any browser.
> To reproduce this, using a "default" installation, with remap.require 
> disabled (so, forward proxy), I run
> {code}
> curl -D -  -x localhost:8080 http://www.craigslist.com
> {code}
> I don't know what it is that Craigslist does to trigger this, but backing out 
> the patch from TS-2559 does fix the problem.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to