-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unhar
: Content extraction insufficient
#58
Comments
It's really unfortunate that there are so many differences between HAR implementations. :(
Yeah, that's not true at all in practice. Let's go through a few examples. File uploadI've used https://cgi-lib.berkeley.edu/ex/fup.cgi to capture a HAR of a simple file upload in Firefox (file-upload-firefox.json) and Chrome (file-upload-chrome.har). The site uses In Firefox, the raw multipart encoded data ends up as a string in In Chrome, meanwhile, both In And indeed, I can't seem to find a way to get to it in the Chrome dev tools, either: So, don't use Chrome to generate HAR files if you want them to actually contain everything you've uploaded, I guess? Phenomenal stuff. HTML formI also tried a more simple case of this basic HTML form in Chrome (post-chrome.json) and Firefox (post-firefox.har): <!DOCTYPE html>
<html>
<body>
<form action="https://example.org" method="post">
<input type="text" name="test">
<input type="submit">
</form>
</body>
</html> As I didn't set an In Firefox, both The same is the case in Chrome: Other implementationsI also tried two other HAR implementations. First, Insomnia (post-insomnia.har, multipart-insomnia.har), which only populates And, more importantly for us, the mitmproxy HAR dump script. I only had an example for |
And Chrome's HAR export is getting even more useless: https://developer.chrome.com/blog/new-in-devtools-130#har |
In
unhar()
, we are currently assuming that a HAR can only hold a request body inrequest.postData.text
:TrackHAR/src/common/request.ts
Line 45 in b219141
That is not true. It can also have POST params in
request.postData.params
(which we are currently just ignoring):http://www.softwareishard.com/blog/har-12-spec/#postData
The text was updated successfully, but these errors were encountered: