1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-10-27 20:34:16 +00:00

HTTP Server: Retain new-line when processing form-data [#315]

This commit is contained in:
gnosygnu 2018-12-31 07:09:36 -05:00
parent cc502c872f
commit e250331e97
2 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,7 @@ public class Http_request_parser {
while (true) {
line = Bry_.new_u8(rdr.Read_line());
if (Bry_.Has_at_bgn(line, content_type_boundary)) break;
tmp_bfr.Add(line);
tmp_bfr.Add(line).Add_byte_nl();
}
byte[] val = tmp_bfr.To_bry_and_clear();
post_data_hash.Add(key, val);

View File

@ -41,8 +41,8 @@ public class Http_request_parser_tst {
, "val1"
, "-----------------------------12345678901234--"
)
, fxt.Make_post_data_itm("key0", "val0")
, fxt.Make_post_data_itm("key1", "val1")
, fxt.Make_post_data_itm("key0", "val0\n")
, fxt.Make_post_data_itm("key1", "val1\n")
);
}
@Test public void Type_accept_charset() {