瀏覽代碼

Do not reply invalid URIs in error messages

bel 9 年之前
父節點
當前提交
8658a22ac6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/civetweb.c

+ 2 - 2
src/civetweb.c

@@ -12796,9 +12796,9 @@ process_new_connection(struct mg_connection *conn)
 					            NULL, /* No truncation check for ebuf */
 					            NULL, /* No truncation check for ebuf */
 					            ebuf,
 					            ebuf,
 					            sizeof(ebuf),
 					            sizeof(ebuf),
-					            "Invalid URI: [%s]",
-					            ri->request_uri);
+					            "Invalid URI");
 					send_http_error(conn, 400, "%s", ebuf);
 					send_http_error(conn, 400, "%s", ebuf);
+					conn->request_info.local_uri = NULL;
 					break;
 					break;
 				}
 				}