diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-10-07 13:04:00 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-10-07 13:14:13 -0700 |
| commit | 617bb5112834eee40d7eaf00bfc7e98e0ae1ff01 (patch) | |
| tree | 686a5566b64d1cb79b495e00f5c106145f58b74b /src/supplemental/http/http_public.c | |
| parent | 6c334f30cccaa9ddae81ee0865621b6695fb7e3a (diff) | |
| download | nng-617bb5112834eee40d7eaf00bfc7e98e0ae1ff01.tar.gz nng-617bb5112834eee40d7eaf00bfc7e98e0ae1ff01.tar.bz2 nng-617bb5112834eee40d7eaf00bfc7e98e0ae1ff01.zip | |
fixes #745 HTTP server redirect handler
Diffstat (limited to 'src/supplemental/http/http_public.c')
| -rw-r--r-- | src/supplemental/http/http_public.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/supplemental/http/http_public.c b/src/supplemental/http/http_public.c index b86521b0..50ef03fa 100644 --- a/src/supplemental/http/http_public.c +++ b/src/supplemental/http/http_public.c @@ -559,6 +559,21 @@ nng_http_handler_alloc_directory( } int +nng_http_handler_alloc_redirect( + nng_http_handler **hp, const char *uri, uint16_t status, const char *where) +{ +#ifdef NNG_SUPP_HTTP + return (nni_http_handler_init_redirect(hp, uri, status, where)); +#else + NNI_ARG_UNUSED(hp); + NNI_ARG_UNUSED(uri); + NNI_ARG_UNUSED(status); + NNI_ARG_UNUSED(where); + return (NNG_ENOTSUP); +#endif +} + +int nng_http_handler_alloc_static(nng_http_handler **hp, const char *uri, const void *data, size_t size, const char *ctype) { |
