Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpVersion not captured correctly in HTTP Archive har file #1391

Closed
tunetheweb opened this issue Sep 19, 2020 · 0 comments · Fixed by #1392
Closed

httpVersion not captured correctly in HTTP Archive har file #1391

tunetheweb opened this issue Sep 19, 2020 · 0 comments · Fixed by #1392

Comments

@tunetheweb
Copy link
Contributor

httpVersion is not captured correctly more often than not and seems to be blank for HTTP/1.1 requests and either ori or us:

I had a grep through the code and found this (and a similar one for response further down):

https://github.com/WPO-Foundation/webpagetest/blob/3afaeea71067efa0316786b79cae4de7d9724f8c/www/har/HttpArchiveGenerator.php#L227-L260

From my limited understanding it seems to to look for a header which has a colon (but not in first position) is a candidate for HTTP version and then grabs the 3 characters after HTTP.

While that may work in a HTTP/1.0 and HTTP/1.1 world (though even there seems flakey) it definitely won't work in a HTTP/2 which has pseudo headers which begin with a colon (so in position 0) such as :authority: (note the 3 characters after the 5 characters is ori) or :status: (note the 3 characters after the 5 characters is us:) and also only has a 1 character version number not 3.

It looks like the correct version number is in the _protocol column but don't think you can get a different value for request and response like I guess you could get in the pre-HTTP/2 world.

@tunetheweb tunetheweb changed the title httpVersion not captured correctly httpVersion not captured correctly in HTTP Archive har file Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant