瀏覽代碼

Fix missing boundary (#682)

bel2125 6 年之前
父節點
當前提交
e8b8b9c9b1
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/handle_form.inl

+ 5 - 0
src/handle_form.inl

@@ -941,6 +941,11 @@ mg_handle_form_request(struct mg_connection *conn,
 
 				/* Find boundary */
 				next = search_boundary(buf, (size_t)buf_fill, boundary, bl);
+
+				if (!next && (r == 0)) {
+					/* incomplete request */
+					all_data_read = 1;
+				}
 			}
 
 			towrite = (size_t)(next - hend);