trafficserver
trafficserver copied to clipboard
Transform tunnels stall when no bytes are sent
While researching the assert described in issue #8079, we noticed that a WriteTransform plugin applied to a 0 length body will stall. The logic to fully set up the WriteTransform tunnel requires receiving a WRITE_READY event. But in the case of a 0 length body, the tunnel will go directly into READ_COMPLETE, WRITE_COMPLETE, and TUNNEL_PRECOMPLETE. No do_io_write or do_io_read operations will be set up, so no READ_READY/WRITE_READY events will be sent to trigger the sending of the TRANSFORM_READ_READY.
Eventually sometime will timeout and kill the HttpSM.
This is a place where the convention of using zero length IO operation to indicate "disabled" vs. having an explicit disable is a problem. Presumably it will be necessary to send the WRITE_READY
(or possibly WRITE_COMPLETE
) explicitly but it will also be necessary to wait for any transforms rather than proceeding on. Another side effect of this is if the transforms adds content this is not reflected in the proxy response fields, which will have a Content-Length: 0
regardless.
This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.