GitHub user masaori335 opened a pull request:

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

    TS-4759: Fix stream states management

    Below is the situation when this failure is happen.
    
    1. h2spec sends a HEADERS frame with END_HEADERS flag and without 
END_STREAM flag.
    2. TS returns a HEADERS frame and two DATA frames immediately. And TS set 
server side stream state `closed`.
    3. h2spec sends RST_STREAM with a length other than 4 cotets.
    4. TS ignores RST_STREAM to closed stream. 
    
    There are two problems.
    
    - h2spec assumes server side stream state is open. ( This is fixed by 
h2spec v1.5.0 )
    - At #2, TS should change server side stream state to `half-close (local)`.
       And send RST_STREAM frame to client and make state `closed`.
    
    To fix this
    
    - Change stream state to `half-close (local)` from `idle` or `open` when 
send a frame w/ END_STREAM flag
    - Make send_a_data_frame to return HTTP2_SEND_A_DATA_FRAME_DONE when send 
DATA frame w/ END_STREAM flag
    - Set stream state CLOSED when error is happen

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

    $ git pull https://github.com/masaori335/trafficserver ts-4759

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

    https://github.com/apache/trafficserver/pull/999.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 #999
    
----
commit a907e554efcfd4789ad13e7bf3df32ed2de273ea
Author: Masaori Koshiba <[email protected]>
Date:   2016-08-29T06:19:00Z

    TS-4759: Fix stream states management
    
    - Change stream state from IDLE or OPEN to HALF_CLOSED_LOCAL when send a 
frame w/ END_STREAM
    - Make send_a_data_frame to return HTTP2_SEND_A_DATA_FRAME_DONE when send 
DATA frame w/ END_STREAM
    - Set stream state CLOSED when error is happen

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to