Fix overwriting of appended request headers (#493)

* don't overwrite appended user headers

* Fixes tests, all header ordering related

* does not need to clone default headers, added a test
This commit is contained in:
Jerome Gravel-Niquet
2019-04-15 15:33:03 -04:00
committed by Sean McArthur
parent 38ea6a2d3c
commit 77434a29aa
6 changed files with 88 additions and 19 deletions

View File

@@ -21,10 +21,10 @@ fn text_part() {
let server = server! {
request: format!("\
POST /multipart/1 HTTP/1.1\r\n\
user-agent: $USERAGENT\r\n\
accept: */*\r\n\
content-type: multipart/form-data; boundary={}\r\n\
content-length: 125\r\n\
user-agent: $USERAGENT\r\n\
accept: */*\r\n\
accept-encoding: gzip\r\n\
host: $HOST\r\n\
\r\n\
@@ -70,10 +70,10 @@ fn file() {
let server = server! {
request: format!("\
POST /multipart/2 HTTP/1.1\r\n\
user-agent: $USERAGENT\r\n\
accept: */*\r\n\
content-type: multipart/form-data; boundary={}\r\n\
content-length: {}\r\n\
user-agent: $USERAGENT\r\n\
accept: */*\r\n\
accept-encoding: gzip\r\n\
host: $HOST\r\n\
\r\n\