Open Bug 1613361 Opened 6 years ago Updated 4 years ago

Issues when exporting x-www-form-url-encoded post requests to HAR

Categories

(DevTools :: Netmonitor, defect, P3)

72 Branch
Desktop
All
defect

Tracking

(firefox-esr68 affected, firefox72 affected, firefox73 affected, firefox74 affected, firefox75 affected)

Tracking Status
firefox-esr68 --- affected
firefox72 --- affected
firefox73 --- affected
firefox74 --- affected
firefox75 --- affected

People

(Reporter: simme, Unassigned)

Details

Attachments

(1 file)

Attached file test-har.har —

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

Steps to reproduce:

  1. Go to for instance http://test.loadimpact.com/
  2. Do a login attempt.
  3. Save the requests as HAR

Seem to be the case for all post requests that utilize query params.

Actual results:

Currently, it picks both, which does not adhere to the HAR 1.2 specification.

Expected results:

Chrome should pick either params or text in the for the postData.

First of all, this bug sounds like an enhancement. I do not know whether it is valid or not, but I will set this bug's component as (Core) Networking and hope it will be properly addressed from there. If the component is incorrect, please set a more appropriate one.

Thank you for your contribution!

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Component: Untriaged → Networking
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → Desktop
Component: Networking → General
Product: Core → DevTools
Component: General → Netmonitor

Thanks for the report!

(In reply to simme from comment #0)

Steps to reproduce:

  1. Go to for instance http://test.loadimpact.com/
  2. Do a login attempt.

What exactly we should do to try to login?
I don't see any login button or link on the page...

  1. Save the requests as HAR

Seem to be the case for all post requests that utilize query params.

Actual results:

Currently, it picks both, which does not adhere to the HAR 1.2 specification.

Expected results:

Chrome should pick either params or text in the for the postData.

I am unsure what you mean by Currently, it picks both, which does not adhere to the HAR 1.2 specification.

Honza

Flags: needinfo?(simme)

Hi!

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #2)

What exactly we should do to try to login?
I don't see any login button or link on the page...

Just click the User's messages link or go to http://test.loadimpact.com/my_messages.php.

I am unsure what you mean by Currently, it picks both, which does not adhere to the HAR 1.2 specification.

According to both the HAR 1.2 and HAR 1.3 specification, postData text and params are mutually exclusive.
In Firefox, however, both are currently added to the HAR file, which leaves it to the consumer to decide which one to give precedence.

Flags: needinfo?(simme)

I see that I wrote Chrome somewhere in my original post, as it has the exact same behavior, but this is indeed or Firefox.

Ah, I see what you mean, yes I totally forgot that they are mutually exclusive.

I am using this STR:

  1. Load http://janodvarko.cz/test/websockets/
  2. Open the Network panel (or clear all requests in it)
  3. Click the POST button on the page
  4. Copy all as HAR and paste into: http://janodvarko.cz/test/websockets/
  5. Both log.entries[0].request.postData.params and log.entries[0].request.postData.text fields are set -> BUG

ER: the HAR spec says: text and params fields are mutually exclusive.
http://www.softwareishard.com/blog/har-12-spec/#postData

Honza

Type: enhancement → defect
Has STR: --- → yes
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: