Closed HalosGhost closed 6 years ago
It's now possible to specify the code for redirects, but Lwan must know about it. In other words, if the code isn't known by Lwan (not every HTTP code is), it'll still silently use 301. To add a new code, add it to enum lwan_http_status, and add the appropriate entry in the lwan-tables.c file. PRs are welcome.
This is awesome! I am particularly interested in 307
(as title mentions), shall I go ahead and add all the other redirects for completeness?
Closing issue as fixed.
301
, though often used, can be really problematic. Mainly, it escapes all caching requirements: user-agents are allowed to indefinitely store 301s (so that refresh-without-cache can still see them).As a result, having this be the only method of redirect available is unfortunate. At least, supporting
307
(like301
but with standard caching and requires that the full request be repeated with the new URI—i.e., the request method cannot change) would be very nice.❤