Skip to content
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

Fix firefox deserialization + fix from_reader #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

grelner
Copy link

@grelner grelner commented Aug 4, 2023

This fixes two things:

  1. Firefox does not write send, wait and receive in Timings. They have been changed to optional
  2. from_reader was using serde_yaml instead of serde_json

Comment on lines +204 to +209
#[serde(default = "default_fsize_maybe")]
pub send: Option<f64>,
#[serde(default = "default_fsize_maybe")]
pub wait: Option<f64>,
#[serde(default = "default_fsize_maybe")]
pub receive: Option<f64>,
Copy link
Owner

@mandrean mandrean Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the HAR v1.3 draft spec, send, wait and receive are all required fields. They even explicitly write that they are not optional, see:

https://github.com/ahmadnassri/har-spec/blob/master/versions/1.3.md#timings

image

Comment on lines +198 to +203
#[serde(default = "default_fsize_maybe")]
pub send: Option<f64>,
#[serde(default = "default_fsize_maybe")]
pub wait: Option<f64>,
#[serde(default = "default_fsize_maybe")]
pub receive: Option<f64>,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the HAR v1.2 spec, send, wait and receive are all required fields. They even explicitly write that they are not optional, see:

http://www.softwareishard.com/blog/har-12-spec/#timings

image

@mandrean
Copy link
Owner

Hey @grelner, thanks for opening the PR!

Can the Firefox issue you're describing be solved without breaking the HAR v1.2 and v1.3 specs? send, wait and receive are all required fields.

Also a test reproducing the Firefox issue would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants