Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nickshanks opened this issue Jan 26, 2018 · 0 comments
Open

Comments

@nickshanks
Copy link

nickshanks commented Jan 26, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant