Open Bug 1757891 Opened 3 years ago Updated 3 years ago

Http version is "undefined" in request header

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: kershaw, Unassigned)

References

(Blocks 1 open bug)

Details

See https://bugzilla.mozilla.org/show_bug.cgi?id=1757503#c8.
The http version is undefined.
The default http version of request header is HTTP/1.1, so we should at least show HTTP/1.1?

Thanks for reporting!
Is there any link we can use to reproduce this?

Flags: needinfo?(kershaw)
  1. Make sure dom.security.https_first_pbm in about:config is set to the default value (true)
  2. open private browsing.
  3. turn on "persist logs" in developer tools
  4. Type http://alpha.bakacafe.com into the address bar and hit the enter key.

You will see a request to https://alpha.bakacafe.com with the header GET / undefined
(You can see it if you select "raw" for the request headers)

This happens with any domain where https is not available. Unfortunately with some web servers (IIS in my case) this seems to cause more than 2 second delay before the browser decides to continue to a second request for http version instead. This delay is there, even if developer tools is turned off; it does not look like a developer tools issue showing undefined, but an issue with undefined actually being send in the headers for the first request that tries https first.

If https is available for the domain, it looks like the first request in the developer tools gets updated once the connection is being established, so you do not see the undefined header. I am not sure if this is because the handshake is successful so the bug does not happen and the proper header is sent, or if the wrong header is sent and then once https is established the correct header is sent and replaces it in developer tools.

Expected: when http:// is entered, the "https first" attempt should have the header GET / HTTP/1.1 I am not sure if this affects post requests too.

Thanks for the STR.
I can reproduce this locally.

Flags: needinfo?(kershaw)

Nice! I can reproduce as well!
Thanks Frank!

Has STR: --- → yes
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.