Request headers size in kibibyte?

Hello,

In Network tab, you can see the HTTP headers of the requests and the size is also displayed. I think that the size is displayed in kibibyte, but with the kB text.

I’m testing the connection to a WebSocket that would accept requests of up to 1024 bytes (JSON-RPC of Kodi). With the following requests, DevTools displays 1 kB and the request is accepted by the server.

GET /jsonrpc HTTP/1.1
Host: 192.168.1.2:9090
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
Accept: */*
Accept-Language: fr-FR,fr;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Sec-WebSocket-Version: 13
Origin: moz-extension://4f74de59-b51d-44b5-997e-056f944d030e
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: jD4wycC8AhD2XnBbjvodOg==
DNT: 1
Connection: keep-alive, Upgrade
Cookie: test=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccdddddeeeee1234
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket

If I add a character in the cookie, the connection to the server no longer works. So I think the size is displayed in kibibyte. But I count 1006 characters in the header. Or 984 characters without the line GET /jsonrpc HTTP/1.1.

This should be hopefully fixed with https://bugzilla.mozilla.org/show_bug.cgi?id=1621919 in Firefox 77. When the patch lands, maybe you can test it out in Nightly and help us verify that it works as expected.

Thanks a lot for the detailed bug report!

1 Like