K6 http header anomaly / How to config Fiddler for k6

I’m trying to test gzip compression performance improvements on HTTP(S) traffic with k6. However, some observations does not make sense when using --http-debug option for k6. It looks like (based on --http-debug output) k6 is implicitly adding field “Accept-Encoding: gzip” into http header. However, if I add that field explicitly the order of HTTP header fields are changed, but the header is otherwise the same, yet the test results differ. So, I’m very confused and would like to confirm the result by Fiddler, but I’m not able to capture k6 traffic by Fiddler.

Any idea on how to verify the true http header by Fiddler or some other 3rd party tool because I simply can’t trust the output when using k6 --http-debug. I need a way to verify the output.

I have tried capturing k6 traffic with Fiddler in 1) Win10 command line, using npm scripts to run k6 and 2) Linux (Ubuntu) subsystem in Windows 10, k6 installed on Ubuntu. But capturing with Fiddler fails in both options. I have tried to to configure HTTPS proxy in Windows command line and Ubuntu, but it doesn’t help.

1 Like

Update: See my bug report.

2 Likes

Hello @kimke, I am also investigating a strange error that I can’t figure out. How did you get fiddler to work?

1 Like

@mohamed_hava I’ll let you know if I find out. I’m also investigating. By the way, have you figured it out yet? Getting fiddler to capture k-6?

I could not get fiddler to capture the http traffic from my k6 testing.

I haven’t used Fiddler in a long time, but k6 respects the HTTP_PROXY and HTTPS_PROXY environment variables, and you should be able to pass the traffic through fiddler, as this comment has shown: How to capture k6 requests with Fiddler? - #3 by KGBentley