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

har: set bodySize and headersSize to -1 and fix response.bodySize #289

Closed
wants to merge 1 commit into from
Closed

har: set bodySize and headersSize to -1 and fix response.bodySize #289

wants to merge 1 commit into from

Conversation

william-p
Copy link
Contributor

Meanwhile better from PhantomJS, set default (-1) value to request.bodySize and request.headersSize.
Fill response.bodySize with correct value.

httpVersion: 'HTTP/1.1',
method: request.method,
queryString: [],
url: request.url,
},
response: {
bodySize: startReply.contentLength,
bodySize: startReply.bodySize,
Copy link
Owner

Choose a reason for hiding this comment

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

I'd rather keep relying on contentLength (see #277)

@macbre
Copy link
Owner

macbre commented Apr 29, 2014

👍 (left inline comment)

@william-p
Copy link
Contributor Author

Outch sorry ...
Something is strange, at line 202 res.contentLength is undefined, i've wrong ?

@macbre
Copy link
Owner

macbre commented Apr 29, 2014

contentLength is set in entry passed by recv event handling.

@william-p
Copy link
Contributor Author

Okay, what do you think about bind recv and send events (instead onResource*) in HAR module ?

At line 130 (requestsMonitor) recv event is not emitted for start stage, normal ?

@macbre
Copy link
Owner

macbre commented Apr 29, 2014

Yep, sounds fine.

recv event is triggered when the resource is completely fetched - that's why it's fired when stage equals end.

@william-p
Copy link
Contributor Author

Okay, i will open new PR for that.

@william-p william-p closed this May 12, 2014
@william-p william-p deleted the har_spec branch May 12, 2014 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants