-
Notifications
You must be signed in to change notification settings - Fork 507
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/handle malformed cookiestring response #1540
Fix/handle malformed cookiestring response #1540
Conversation
Is this a regression in v2.0.0-22, i.e. does it work with v2.0.0-21, or have we always had this issue? |
core/lib/engine_http.js
Outdated
try { | ||
context._jar.setCookieSync(cookieString, url); | ||
} catch (err) { | ||
ee.emit('error', 'Could not parse cookieString from response header, skipping it ' + cookieString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The messages from these error
events go right into the metric report, so it's best to keep it short. How about something like cookie_parse_error_invalid_cookie
?
For debugging we can log the current message with debug()
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, used uppercase for the error message for consistency.
One detail is that we can get N error messages for one call (as there may be N invalid Set-Cookie headers)
See this comment
tldr: handles malformed cookies received through a response Set-Cookie header
closes ART-574