httpunit
httpunit copied to clipboard
Add HTTP 2.0 feature testing
trafficstars
We need the ability to:
- Restrict test to http 1.1
- Restrict test to http 2
- Test server-push
Very interesting idea. In order of difficulty:
- Restricting to 1.1 is easy. Just override Transport.TLSNextProto as per the http docs.
- Restricting to http 2 is not so apparent to me, but we can read the Proto used from the response. That may be sufficient?
- Not sure how to test server push. There is some code in the http2 package that looks feasable, but it is not clear how to use it. Still doing research there.
Still looking for a good way to verify push frames.
http://stackoverflow.com/questions/43852955/how-can-i-read-http-2-push-frames-from-a-net-http-request doesn't have anything too promising yet.
Links to https://github.com/golang/go/issues/18594 which is a discussion about adding higher level client support sometime in the future.
This is all low priority. The push tests aren't important for now.