Skip to content

WebMock::Util::Headers.normalize_headers replaces underscores with dashes #474

Description

@mikekelly

WebMock is unable to correctly mock server responses that include underscores in the header names because it replaces any underscores with dashes. Is there a specific reason for this behaviour? I checked the HTTP specification and underscores are not an illegal character.

The offending line is here:

[name.to_s.split(/_|-/).map { |segment| segment.capitalize }.join("-"),

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions