Explorar o código

Rewrite request parsing (Step 8/?)

bel2125 %!s(int64=8) %!d(string=hai) anos
pai
achega
a4cd4653e4
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      src/civetweb.c

+ 5 - 2
src/civetweb.c

@@ -3044,8 +3044,11 @@ mg_get_request_info(const struct mg_connection *conn)
 	if (conn->connection_type == 2) {
 	if (conn->connection_type == 2) {
 		static char txt[16];
 		static char txt[16];
 		sprintf(txt, "%03i", conn->response_info.status_code);
 		sprintf(txt, "%03i", conn->response_info.status_code);
-		((struct mg_connection *)conn)->request_info.request_uri =
-		    txt; /* TODO: not thread safe */
+
+		((struct mg_connection *)conn)->request_info.local_uri =
+		    ((struct mg_connection *)conn)->request_info.request_uri =
+		        txt; /* TODO: not thread safe */
+
 		((struct mg_connection *)conn)->request_info.num_headers =
 		((struct mg_connection *)conn)->request_info.num_headers =
 		    conn->response_info.num_headers;
 		    conn->response_info.num_headers;
 		memcpy(((struct mg_connection *)conn)->request_info.http_headers,
 		memcpy(((struct mg_connection *)conn)->request_info.http_headers,