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

Crash when capturing 'Expires' cookie attribute #2870

Closed
jcamiel opened this issue Jun 4, 2024 · 0 comments · Fixed by #2907
Closed

Crash when capturing 'Expires' cookie attribute #2870

jcamiel opened this issue Jun 4, 2024 · 0 comments · Fixed by #2907
Labels
bug Something isn't working
Milestone

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented Jun 4, 2024

With an endpoint returning a cookie without an 'Expires' attribute (or a lowercase 'expires' attributes), if we try to capture this attribute Hurl panics:

google.hurl:

GET https://www.google.com
HTTP 200
[Captures]
value: cookie "SOCS"
expires: cookie "SOCS[Expires]"

Response headers:

< set-cookie: SOCS=CAAaBgiAsvmyBg; expires=Fri, 04-Jul-2025 11:22:42 GMT; path=/; domain=.google.com; Secure; SameSite=lax
< set-cookie: AEC=AQTF6Hx_QHlxFBMgVxpf4tzZwi10McJLdNbs6eVg_9pf208MtZ_p1E7BFg; expires=Sun, 01-Dec-2024 11:22:42 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
< set-cookie: __Secure-ENID=20.SE=OlzTMASXhWsrOlcfH-3NzGM7BswDSLQhcRq-l-JNigUR6XoCBy_l-hqVn4_B1PL-UiuElYkaFpLGgO5g0KA0pwORcoSqhOVJ0YWsZcU9kfvambBbL6hqDWhDzjQjxa6XI_Hxx6iMSVYl_TCzdL5iSX8uG5P-qY3Y1-NELRlm58vvDib2h1uxCHxIXGtNbiFjzT370zkdx4cCcgorjA; expires=Sat, 05-Jul-2025 03:41:00 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax

Run:

$ hurl google.hurl 
thread 'main' panicked at packages/hurl/src/runner/query.rs:291:38:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@jcamiel jcamiel added the bug Something isn't working label Jun 4, 2024
@jcamiel jcamiel added this to the 5.0.0 milestone Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant