Skip to content

Commit 581540a

Browse files
authored
Merge pull request #120 from VShell/patch-1
Fix 100 Continue
2 parents 611ca51 + dd2cb24 commit 581540a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/decode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fn url_from_httparse_req(req: &httparse::Request<'_, '_>) -> http_types::Result<
128128
}
129129

130130
const EXPECT_HEADER_VALUE: &str = "100-continue";
131-
const EXPECT_RESPONSE: &[u8] = b"HTTP/1.1 100 Continue\r\n";
131+
const EXPECT_RESPONSE: &[u8] = b"HTTP/1.1 100 Continue\r\n\r\n";
132132

133133
async fn handle_100_continue<IO>(req: &Request, io: &mut IO) -> http_types::Result<()>
134134
where
@@ -223,7 +223,7 @@ mod tests {
223223
let result = async_std::task::block_on(handle_100_continue(&request, &mut io));
224224
assert_eq!(
225225
std::str::from_utf8(&io.into_inner()).unwrap(),
226-
"HTTP/1.1 100 Continue\r\n"
226+
"HTTP/1.1 100 Continue\r\n\r\n"
227227
);
228228
assert!(result.is_ok());
229229
}

0 commit comments

Comments
 (0)