masaori335 commented on pull request #7237:
URL: https://github.com/apache/trafficserver/pull/7237#issuecomment-703370076


   For the testing, another approach is adding a test case on h2spec. But I 
don't think the h2spec project will accept this.
   <details><summary>Bad client: no EOS</summary>
   
   ```
        tg.AddTestCase(&spec.TestCase{
                Desc:        "Bad client: POST without EOS",
                Requirement: "Timeout",
                Run: func(c *config.Config, conn *spec.Conn) error {
                        var streamID uint32 = 1
   
                        err := conn.Handshake()
                        if err != nil {
                                return err
                        }
   
                        headers := spec.CommonHeaders(c)
                        headers[0].Value = "POST"
                        headers = append(headers, 
spec.HeaderField("content-length", "4"))
   
                        hp := http2.HeadersFrameParam{
                                StreamID:      streamID,
                                EndStream:     false,
                                EndHeaders:    true,
                                BlockFragment: conn.EncodeHeaders(headers),
                        }
   
                        conn.WriteHeaders(hp)
                        conn.WriteData(streamID, false, []byte("test"))
   
                        return nil
                },
        })
   ```
   </details>
   
   Realistically, we need to write a special client in C or Python to integrate 
with AuTest.
   Unfortunately, `hyper-0.7.0` doesn't give us control of the EOS flag. But 
according to the example of `hyper-h2` ( the new version of the hyper) we can 
control the EOS flag on POST. A big concern is `hyper-h2` introduces dependency 
hell on our AuTest env.
   
https://python-hyper.org/projects/hyper-h2/en/stable/twisted-post-example.html


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to