瀏覽代碼

Rewrite request parsing (Step 8/?)

bel2125 8 年之前
父節點
當前提交
a4cd4653e4
共有 1 個文件被更改,包括 5 次插入2 次删除
  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) {
 		static char txt[16];
 		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 =
 		    conn->response_info.num_headers;
 		memcpy(((struct mg_connection *)conn)->request_info.http_headers,