Skip to content

Conversation

@zizhong
Copy link
Member

@zizhong zizhong commented May 2, 2017

Currently, h2spec reports the issue as follows.

Hypertext Transfer Protocol Version 2 (HTTP/2)
  4. HTTP Frames
    4.1. Frame Format
           [send] SETTINGS Frame (length:6, flags:0x00, stream_id:0)
           [recv] SETTINGS Frame (length:12, flags:0x00, stream_id:0)
           [send] SETTINGS Frame (length:0, flags:0x01, stream_id:0)
           [recv] WINDOW_UPDATE Frame (length:4, flags:0x00, stream_id:0)
           [recv] SETTINGS Frame (length:0, flags:0x01, stream_id:0)
           [send] Raw Data (0x000008061600000000)
           [send] Raw Data (0x0000000000000000)
           [recv] Connection closed
      × 2: Sends a frame with undefined flag
        -> The endpoint MUST ignore any flags that is undefined.
           Expected: PING frame
             Actual: Connection closed

With this patch,

    4.1. Frame Format
           [send] SETTINGS Frame (length:6, flags:0x00, stream_id:0)
           [recv] SETTINGS Frame (length:12, flags:0x00, stream_id:0)
           [send] SETTINGS Frame (length:0, flags:0x01, stream_id:0)
           [recv] WINDOW_UPDATE Frame (length:4, flags:0x00, stream_id:0)
           [recv] SETTINGS Frame (length:0, flags:0x01, stream_id:0)
           [send] Raw Data (0x000008061600000000)
           [send] Raw Data (0x0000000000000000)
           [recv] PING Frame (length:8, flags:0x01, stream_id:0)
      ✔ 2: Sends a frame with undefined flag

Finished in 0.0529 seconds
1 tests, 1 passed, 0 skipped, 0 failed

@zizhong
Copy link
Member Author

zizhong commented May 2, 2017

@masaori335 @maskit Would you review this? It's a small fix for one of the issues reported by h2spec.

@masaori335 masaori335 added this to the 8.0.0 milestone May 2, 2017
@masaori335 masaori335 requested review from masaori335 and maskit May 2, 2017 01:55
@maskit
Copy link
Member

maskit commented May 2, 2017

I think we can simply remove the check and current_hdr.flags should be untouched. Because setting zero should be done on sender side and we have to ignore them even if some undefined flags are set.

@zizhong
Copy link
Member Author

zizhong commented May 2, 2017

@maskit You're right. Updated.

@masaori335
Copy link
Contributor

[approve ci]

@atsci
Copy link

atsci commented May 2, 2017

@atsci
Copy link

atsci commented May 2, 2017

RAT check successful! https://ci.trafficserver.apache.org/job/RAT-github/357/

@atsci
Copy link

atsci commented May 2, 2017

Intel CC build successful! https://ci.trafficserver.apache.org/job/icc-github/470/

@atsci
Copy link

atsci commented May 2, 2017

Linux build successful! https://ci.trafficserver.apache.org/job/linux-github/1931/

@atsci
Copy link

atsci commented May 3, 2017

@atsci
Copy link

atsci commented May 3, 2017

FreeBSD11 build successful! https://ci.trafficserver.apache.org/job/freebsd-github/2039/

@atsci
Copy link

atsci commented May 3, 2017

clang-analyzer build successful! https://ci.trafficserver.apache.org/job/clang-analyzer-github/603/

Copy link
Member

@maskit maskit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member

@maskit maskit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http2_frame_flags_are_valid is used only here and in the regression test, so I think we can remove the function itself, and the condition used in it should be moved into the regression test.

@zizhong
Copy link
Member Author

zizhong commented May 3, 2017

@maskit fixed.

@maskit
Copy link
Member

maskit commented May 6, 2017

Thanks.

@maskit maskit merged commit 0d39b4a into apache:master May 6, 2017
@zwoop
Copy link
Contributor

zwoop commented May 7, 2017

@maskit Do we want this for 7.1.0?

@maskit
Copy link
Member

maskit commented May 7, 2017

@zwoop I think it's nice to have. It matters only if some clients violate the protocol.

@zwoop zwoop added this to the 7.1.0 milestone May 9, 2017
@zwoop zwoop removed this from the 8.0.0 milestone May 9, 2017
@zwoop
Copy link
Contributor

zwoop commented May 9, 2017

This doesn't cherry-pick cleanly to 7.1.x branch. If we want this back ported, I think someone will have to make a separate PR. I think it's because of some of the clang-tidy that's been run on master.

@zwoop zwoop modified the milestones: 8.0.0, 7.1.0 May 9, 2017
@zizhong
Copy link
Member Author

zizhong commented May 9, 2017

@zwoop okay, I'll create one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants