internetstandards / Internet.nl

Internet standards compliance test suite
https://internet.nl
175 stars 37 forks source link

HTTP/2-only websites can't be tested #1259

Open baknu opened 9 months ago

baknu commented 9 months ago

Currently Internet.nl needs webservers to support HTTP/1.1 to be able to test them. If a webserver only supports HTTP/2 (and/or HTTP/3) Internet.nl is not able to test for (1) IPv4/IPv6 similarity, (2) HTTPS and (3) Security Options. This was mentioned by a user in a private message via Mastodon on January 17th, 2024.

Our current HTTP client Requests only supports HTTP/1.1. Apparently support for HTTP/2 in Requests depends on urllib3: https://github.com/urllib3/urllib3/milestone/10

Currently the only mature HTTP client in Python that also does HTTP/2 seems to be https://www.python-httpx.org/

Another option would be to use cURL and Python bindings (PycURL).

For a comparison of HTTP clients: https://www.scrapingbee.com/blog/best-python-http-clients/

BTW note that adding a test for HTTP/2 and HTTP/3 is addressed in a separate issue: https://github.com/internetstandards/Internet.nl/issues/160

Ousret commented 9 months ago

Sorry to barge in, It could be worthy to look into Niquests.

Some perks:

And more.