Skip to content

Consider introducing an API for setting a single HTTP response header  #59

@nickshanks

Description

@nickshanks

@nickshanks wrote in #58:

We should probably introduce a new API, quilt_request_header() that only takes a single header line [and added the appropriate line ending itself]

@nevali replied:

quilt_request_header() would be even better if it specifically took (name, value, append|replace) and buffered accordingly within libquilt (with case-insensitivity on name handled properly)

Doing it that way would prevent a single function call from setting multiple values. An API as you describe should also distinguish between appending new values to an existing line delimited by commas (most headers, e.g. Vary support this) or adding as a new header line (e.g. Set-Cookie only supports one value per header due to history—the header name needs to be repeated to add more).

We also have the special status line header to consider if buffering.

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