Fiddler Ideas

The free web debugging proxy for any browser, system or platform.

Export to .har does not preserve case, when post parameters have identical names

When exporting sessions to .har v1.2 and request contains two post parameters with identical name, but different case, it picks only one of them.
For example if post request has following two parameters: compname=foo and CompName=foo, after exporting to .har it will become compname=foo and compname=foo

  • Giorgi Gvianishvili
  • Oct 27 2016
  • Under review
Bug
  • Attach files
  • Eric Lawrence commented
    November 01, 2016 00:15

    This results from Fiddler's use of the ParseQueryString method to populate a NameValueCollection. This collection uses case-insensitive names by default; Fiddler can/should probably use case-sensitive behavior for this scenario, as the default coalescing of multiple names into a single parameter isn't desirable and case-sensitivity will at least make it less common. 

    Having said that, trying your scenario

    POST http://dupebody.example.com/ HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/x-www-form-urlencoded
    Host: dupebody.example.com
    Content-Length: 25
    compname=foo&CompName=bar

     

    This is what I see in the exported data:

    "postData":{"params":[{"name":"compname", "value":"foo"}, {"name":"compname", "value":"bar"}]

    meaning that both parameters are preserved and the problem here is only that case for the second parameter is not properly preserved. If that's not what you're seeing, could you share a SAZ file that reproduces what you see?

    Thanks!