In my nginx server logs, I have the following entries (IPs and paths altered for illustration purposes):
101.101.101.101 - - [15/Apr/2020:14:46:03 +0000] "GET /item/download-file/ready/5e971e290107e HTTP/2.0" 200 142940 "https://example.com/referer" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
101.101.101.101 - - [15/Apr/2020:14:46:04 +0000] "GET /item/download-file/ready/5e971e290107e HTTP/1.1" 200 5 "https://example.com/referer" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
An issue arises due to the link being for a non-idempotent resource (accessible only once), resulting in a client error.
The links are for file downloads accessed via JavaScript with window.location.href = "..."
. The response server headers contain Content-Disposition: attachment
.
Is there a scenario where Chrome would send two requests in HTTP/2.0 initially followed by HTTP/1.1 shortly after? Perhaps caused by a browser extension?
It's worth noting that I am unable to replicate this behavior on any of my browsers.
Update 2:
This behavior is not exclusive to Chrome, as logs show instances in Edge 44. Additionally, subsequent requests in other cases of this issue remain in HTTP/2.0 instead of switching to HTTP/1.1.
Update:
A request was made for typical response headers:
cache-control: no-store, no-cache, must-revalidate
content-disposition: attachment; filename=sources.zip
content-length: 8597357
content-transfer-encoding: Binary
content-type: application/octet-stream
date: Wed, 15 Apr 2020 17:23:44 GMT
expires: Thu, 19 Nov 1981 08:52:00 GMT
pragma: no-cache
server: nginx/1.16.1
status: 200