Skip to content

Set-Cookie value with space is erroneoussly parsed #4461

@jcamiel

Description

@jcamiel

Given this file:

GET https://httpbin.org/cookies/set?freeform=a%20b

That produces a Set-Cookie reponse header with value a b:

$ hurl --include --cookie-jar /tmp/cookie.jar test.hurl
HTTP/2 302
date: Fri, 03 Oct 2025 07:28:25 GMT
content-type: text/html; charset=utf-8
content-length: 223
server: gunicorn/19.9.0
location: /cookies
set-cookie: freeform="a b"; Path=/
access-control-allow-origin: *
access-control-allow-credentials: true

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="/cookies">/cookies</a>.  If not click the link.

The Set-Cookie value is saved as a instead of a b:

$ cat /tmp/cookie.jar
# Netscape HTTP Cookie File
# This file was generated by Hurl

# Cookies for file </tmp/test.hurl>
httpbin.org	FALSE	/	FALSE	0	freeform	"a

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions