Skip to content

Duplicate request headers are silently dropped (only last value sent) #167

Description

@Noethix55555

When the request headers editor contains two or more lines with the same header name, wuzz only sends the last value and silently discards the rest.

Repro

Enter these two header lines in the request headers view:

X-Custom: one
X-Custom: two

Submit the request. Only X-Custom: two is sent.

Why it matters

This commonly happens when replaying a copied cURL command that uses repeated -H flags (e.g. multiple X-Custom: or Cookie: lines). cURL sends all of them; wuzz silently drops all but the last, diverging from cURL and discarding request data with no warning.

Cause

In SubmitRequest (wuzz.go), the per-line header loop uses headers.Set(name, value) (which replaces) instead of headers.Add(name, value) (which appends).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions