aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/http_static
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/http_static')
-rw-r--r--src/plugins/http_static/http_static.h1
-rw-r--r--src/plugins/http_static/static_server.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/http_static/http_static.h b/src/plugins/http_static/http_static.h
index c754337e303..4e038ed385d 100644
--- a/src/plugins/http_static/http_static.h
+++ b/src/plugins/http_static/http_static.h
@@ -163,6 +163,7 @@ void hss_register_url_handler (hss_url_handler_fn fp, const char *url,
http_req_method_t type);
void hss_session_send_data (hss_url_handler_args_t *args);
void hss_builtinurl_json_handlers_init (void);
+hss_session_t *hss_session_get (u32 thread_index, u32 hs_index);
#endif /* __included_http_static_h__ */
diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c
index cd36be7ccb6..a4c62fcda07 100644
--- a/src/plugins/http_static/static_server.c
+++ b/src/plugins/http_static/static_server.c
@@ -41,7 +41,7 @@ hss_session_alloc (u32 thread_index)
return hs;
}
-static hss_session_t *
+__clib_export hss_session_t *
hss_session_get (u32 thread_index, u32 hs_index)
{
hss_main_t *hsm = &hss_main;
@@ -261,7 +261,6 @@ try_index_file (hss_main_t *hsm, hss_session_t *hs, u8 *path)
redirect =
format (0,
- "HTTP/1.1 301 Moved Permanently\r\n"
"Location: http%s://%U%s%s\r\n\r\n",
proto == TRANSPORT_PROTO_TLS ? "s" : "", format_ip46_address,
&endpt.ip, endpt.is_ip4, print_port ? port_str : (u8 *) "", path);
@@ -275,7 +274,7 @@ try_index_file (hss_main_t *hsm, hss_session_t *hs, u8 *path)
hs->data_len = vec_len (redirect);
hs->free_data = 1;
- return HTTP_STATUS_OK;
+ return HTTP_STATUS_MOVED;
}
static int