Skip to content

multiple Set-Cookie headers do not work with tinyproxy #403

@l2dy

Description

@l2dy

Tinyproxy version

1.11.0 stable

Issue

To send multiple cookies, multiple Set-Cookie headers should be sent in the same response.

-- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie

All but the first of Set-Cookie headers in an HTTP response will be silently dropped by tinyproxy, making websites setting multiple cookies at once fail erratically.

add_header_to_connection() in reqs.c calls orderedmap_append() to buffer the response headers, but if a header with the same key already exists, it will be silently dropped.

tinyproxy/src/hsearch.c

Lines 183 to 186 in d3d8943

if(e->item.key) {
/* it's not allowed to overwrite existing data */
return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions