go icon indicating copy to clipboard operation
go copied to clipboard

x/net/http2: h2spec violation 8.1.2.2

Open fraenkel opened this issue 6 years ago • 3 comments

$ ./h2spec -S -k -t -h 127.0.0.1 -p 8080 http2/8.1.2.2
Hypertext Transfer Protocol Version 2 (HTTP/2)
  8. HTTP Message Exchanges
    8.1. HTTP Request/Response Exchange
      8.1.2. HTTP Header Fields
        8.1.2.2. Connection-Specific Header Fields
          × 1: Sends a HEADERS frame that contains the connection-specific header field
            -> The endpoint MUST respond with a stream error of type PROTOCOL_ERROR.
               Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                         RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                         Connection closed
                 Actual: DATA Frame (length:51, flags:0x01, stream_id:1)
          × 2: Sends a HEADERS frame that contains the TE header field with any value other than "trailers"
            -> The endpoint MUST respond with a stream error of type PROTOCOL_ERROR.
               Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                         RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                         Connection closed
                 Actual: DATA Frame (length:53, flags:0x01, stream_id:1)

Failures: 

Hypertext Transfer Protocol Version 2 (HTTP/2)
  8. HTTP Message Exchanges
    8.1. HTTP Request/Response Exchange
      8.1.2. HTTP Header Fields
        8.1.2.2. Connection-Specific Header Fields
          × 1: Sends a HEADERS frame that contains the connection-specific header field
            -> The endpoint MUST respond with a stream error of type PROTOCOL_ERROR.
               Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                         RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                         Connection closed
                 Actual: DATA Frame (length:51, flags:0x01, stream_id:1)
          × 2: Sends a HEADERS frame that contains the TE header field with any value other than "trailers"
            -> The endpoint MUST respond with a stream error of type PROTOCOL_ERROR.
               Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                         RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                         Connection closed
                 Actual: DATA Frame (length:53, flags:0x01, stream_id:1)

There is a CL which I will rebase and associate to this issue.

fraenkel avatar Jul 11 '18 02:07 fraenkel

Change https://golang.org/cl/111680 mentions this issue: http2: reject connection-level headers with a protocol error

gopherbot avatar Jul 11 '18 02:07 gopherbot

@fraenkel, I see that there is a CL still open for this — is there more to be done to move this forward?

bcmills avatar Feb 03 '23 14:02 bcmills

Brad had a comment regarding how GFE behaves vs the spec. I am not sure if GFE still reports a 400 or not.

fraenkel avatar Feb 03 '23 15:02 fraenkel

Any update on this?

ypaq avatar Oct 05 '23 01:10 ypaq