Passing server_param to the URI callback

This commit is contained in:
Sergey Lyubka committed 2013-12-20 09:44:51 +00:00
1 parent 28f7d83a74
commit b7adf9b52a
2 files changed
+56 -19

No files matched your search

+4
View File
@@ -1746,6 +1746,10 @@ static void call_uri_handler_if_data_is_buffered(struct connection *conn) {
struct iobuf *loc = &conn->local_iobuf;
struct mg_connection *c = &conn->mg_conn;
// Header parsing does memset() on the whole mg_connection, nullifying
// connection_param and server_param. Set them just before calling back.
c->server_param = conn->server->server_data;
c->content = loc->buf;
#ifndef NO_WEBSOCKET
if (conn->mg_conn.is_websocket) {