catchpoint / WebPageTest.agent

Cross-platform WebPageTest agent
Other
213 stars 138 forks source link

Issue with HTTP/2 Redirect reporting #573

Closed pmeenan closed 1 year ago

pmeenan commented 1 year ago

WPT appears to be merging headers from the final redirect target with the original 302 response, leading to incorrect headers and response code information for some redirect requests.

Request #26 in this test shows a redirect and claims the request URL is

https://cdn-2.matterport.com/apifs/models/Crr8mopspuB/images/aru84H5ca4h/03.29.2021_09.06.24.jpg?t=2-087a9ff8e8ab7fd835fe3e8fdea7eda94b0ce38c-1664560232-1&k=apifs%2Fmodels%2FCrr8mopspuB%2Fimages%2Faru84H5ca4h%2F03.29.2021_09.06.24.jpg&width=400&disable=upscale&dpr=3

but the actual URL (from the netlog) was

https://my.matterport.com//api/v1/player/models/Crr8mopspuB/thumb?width=400&dpr=3&disable=upscale

that was redirected to the URL that was displayed (and is shown as request 36 in the waterfall).

The response headers are a mix of the original response headers from the 302 and the response headers from the redirected final response.

It could be coming from the dev tools or netlog processing but is likely to be from the dev tools processing since it is all treated as the same "request" and the splitting of the request ID stopped working.

pmeenan commented 1 year ago

Have it narrowed down to the netlog processing. The devtools side of things seems to have the correct URL and header info for redirects.