Setting a deprecated header should not break
See original GitHub issueThe current behavior prevent from simply replacing https
by http2
in existing peace of software
It should not throw a breaking exception. Instead It should:
- log a deprecation warning
- either set the header anyway (if setting it has no impact), or drop it (if it is no longer meaningful) or migrate it if it is replaced by new header(s).
But in all cases, the request should be processed
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:13 (1 by maintainers)
Top Results From Across the Web
How can I deprecate a C++ header? - Stack Overflow
Here is a possible (albeit perhaps not too elegant) solution. Insert in the header a code like that
Read more >Support the new Deprecation HTTP header #5724 - GitHub
The Deprecation header indicates that an API is deprecated, and shouldn't be used. It's either true , or an HTTP datetime value (the...
Read more >modernize-deprecated-headers - clang-tidy
Some headers from C library were deprecated in C++ and are no longer welcome ... The check in its current form can break...
Read more >Warning Options - Using the GNU Compiler Collection (GCC)
Warnings from system headers are normally suppressed, on the assumption that they usually do not indicate real problems and would only make the...
Read more >HTTP security headers: An easy way to harden your web ...
This post provides an overview of best-practice HTTP security headers that you should be setting in your websites and applications.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@nwgh
I disagree, because
someone
might be a 3rd party HTTP/1 server, for example, CouchDB, which uses only HTTP/1. You’re forgetting thatnode-http2
can and will be used as a proxy and for now mostly as HTTP/2 to HTTP/1. This should be focused around actual usage and not “programming best practices”. You can add strict mode for those who want to be as close to spec as possible.@DaSchTour You can use node-spdy instead as it does handle such cases. (I assume that the reader understands that this advice is not advertisement of node-spdy, and just a library to workaround the issue. No comparison should be implied from my comment).
BrowserSync usage example: