-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Location: handling into ne_request, mostly obsoleting the
ne_redirect.h API. Add ne_get_response_location(). Set descriptive errors for 3xx responses with a Location header. NE_REDIRECT is returned for any 3xx response if ne_redirect API is used. * src/ne_request.c (ne_get_response_location): New function. (ne_end_request): Set descriptive error for a redirect. * src/ne_redirect.c (create, post_send, free_redirect, ne_redirect_register): Rewritten as a simple cache of the URI returned by ne_get_response_location. Handle any 3xx response. * src/ne_redirect.h: Note API is deprecated. * src/ne_request.h: Describe ne_get_response_location. * test/request.c (redirect_error): New test. * test/redirect.c (serve_redir): Removed. (check_redir, redirects): Simplify, and enhance to test ne_get_response_location() directly. Add more relative URI checks and fragment handling.
- Loading branch information
Showing
5 changed files
with
176 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.