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

Susan Hinrichs commented on TS-3777:
------------------------------------

I spent some more time looking at the tunnel_handler_ua and the 
tunnel_handler_server logic.  From what I can tell, these are the handlers that 
work on the user agent side (consumer) and the origin server side (producer) 
for response from server (at least the non-cached case).

In tunnel_handler_server things clean up appropriately if a READ_COMPLETE or a 
HTTP_TUNNEL_EVENT_PRECOMPLETE is received.  If a response header with no body 
is received (quite common I would assume in the post case), the PRECOMPLETE 
event is sent at the end of producer_run().  Otherwise a read is set up and the 
READ_COMPLETE should be set up eventually.

In tunnel_handler_ua, the WRITE_COMPLETE is handled as the success case.  This 
means that the response header and any associated body has been successfully 
written to the user agent VC.  If the user agent is not keep alive, the 
close_connection variable is set.  

At the end of the tunnel_handler_ua function, if the  close_connection variable 
is set and the transaction is  post (that is not internally generated), the 
ua_session half_close flag is set.  This changes the operation of the ua 
session's do_io_close by sending a FIN to the client and setting the client VC 
handler to HttpClientSession::wait_for_close.  That handler will consume any 
data that appears on the buffer, and it will really shut down the client VC on 
EOS, timeout, or error.

So it seems there must be post cases, that send extra data after the response 
header and the advertised content length.  Perhaps some error in chunked 
handling?  Could anyone send me a pcap file of such a case or confirm that is 
the scenario that you are seeing in the wild?  [~sudheerv], [~jacksontj], 
[~zwoop]?

> TSHttpConnect and POST request does not fire TS_VCONN_READ_COMPLETE nor 
> TS_VCONN_EOS
> ------------------------------------------------------------------------------------
>
>                 Key: TS-3777
>                 URL: https://issues.apache.org/jira/browse/TS-3777
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: TS API
>            Reporter: Daniel Vitor Morilha
>            Assignee: Susan Hinrichs
>              Labels: yahoo
>             Fix For: 6.1.0
>
>
> When using TSHttpConnect to connect to ATS itself (internal vconnection), 
> sending a POST request and receiving a CHUNKED response. ATS does not fire 
> neither TS_VCONN_READ_COMPLETE nor TS_VCONN_EOS.
> Trying to close the vconnection from the plug-in after receiving the last 
> chunk ("\r\n0\r\n") results into the PluginVC repeating the following message:
> {noformat}
> [Jul 14 21:24:06.094] Server {0x7ffff7fbe800} DEBUG: (pvc_event) [0] Passive: 
> Received event 1
> {noformat}
> I am glad to provide an example if that helps.



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

Reply via email to