mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 08:35:53 +03:00
[GH-ISSUE #1157] When importing a .har file, timestamps that do not contain fractional seconds fail to import and change to the current time #1153
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IMNilesAZ on GitHub (Feb 24, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1157
Originally assigned to: @NghiaTranUIT on GitHub.
It appears that the way you are parsing timestamps when importing .har files requires a fractional second part (even if it is .0). According to ISO-8601 and RFC 3339, fractional seconds should be optional. When I import a .har file with timestamps that do not have fractional seconds (no decimal), they import as "now".
Proxyman version? (Ex. Proxyman 1.4.3)
3.1.0
macOS Version? (Ex. mac 10.14)
12.2
Steps to reproduce
import .HAR file that contains timestamps that do NOT have fractional seconds
Expected behavior
timestamps are imported correctly instead of turning into "current time"
Screenshots (optional)
@NghiaTranUIT commented on GitHub (Feb 25, 2022):
Hey @IMNilesAZ You're correct. Proxyman only accepts
ISO-8601with fractional seconds. We decide to use it because the latest Charles Proxy, Google Chrome, and Safari use it when exporting as a HAR file.In the older version of Proxyman, we use
ISO-8601without fractional seconds, and it's incompatible with another apps. Hence, we update the format.Just wondering: Which application that you use to export a HAR file (which doesn't have the decimal)? 🤔
We'd like to understand the context and might support both kinds of time formats.
@IMNilesAZ commented on GitHub (Feb 25, 2022):
It’s a custom tool, actually, so as it happens I can easily fix it (the tool actually creates .trace files, which Charles will also happily convert to a .har file). I believe, though, that irrespective of the tool, ISO-8601 specifies that the fractional seconds are optional. So, even if the current versions tools you know about work, you’re still open to failure if the fractions are ever omitted. Hopefully you can adjust your date formatter to allow for the presence or absence of the fractional seconds and then you’ll be covered.
@NghiaTranUIT commented on GitHub (Feb 25, 2022):
If you don't mind, can you share with me a sample HAR file that I can test?
@NghiaTranUIT commented on GitHub (Feb 25, 2022):
@IMNilesAZ let try this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.1.0_Fix_HAR_Timeformat.dmg
Proxyman now supports a standard ISO-8601 with or without the second decimal 👍
@IMNilesAZ commented on GitHub (Feb 25, 2022):
Sure will try it out today, thanks!
@IMNilesAZ commented on GitHub (Feb 28, 2022):
sorry, got busy. Will try to test this today
@IMNilesAZ commented on GitHub (Mar 1, 2022):
Looks like it works, thanks.
I do notice now, by the way, that when a certain timestamp is missing (in my case, it looks like the response start time was missing), it gets reported as "the current time" -- maybe it should be left out or set to some other connection-relevant time instead? Not sure. not a big deal, in any case, it doesn't impact my use case.
As it happens, the tool I'm using actually generates a charles .trace file, so before I can open it in proxyman I have to first use the charles conversion tool to convert it to .har, and then proxyman opens that. It would be handy if proxyman would allow me to open not only .chls files but also any other file the charles converter is capable of converting (notably '.trace'), since it already supports using the converter to open .chls files :). Could be as simple as allowing the .trace extension.
Cheers
@NghiaTranUIT commented on GitHub (Mar 2, 2022):
You're right. I have to change it. By default, if one of these data is absent, it will use the current time, which is incorrect.
Thanks. I will open a ticket for supporting the
*.tracefile 👍