Skip to content

Commit 92ff50f

Browse files
committed
fix(server): Flush 100-continue messages
Closes #704
1 parent 40d4014 commit 92ff50f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ impl<H: Handler + 'static> Worker<H> {
369369
fn handle_expect<W: Write>(&self, req: &Request, wrt: &mut W) -> bool {
370370
if req.version == Http11 && req.headers.get() == Some(&Expect::Continue) {
371371
let status = self.handler.check_continue((&req.method, &req.uri, &req.headers));
372-
match write!(wrt, "{} {}\r\n\r\n", Http11, status) {
372+
match write!(wrt, "{} {}\r\n\r\n", Http11, status).and_then(|_| wrt.flush()) {
373373
Ok(..) => (),
374374
Err(e) => {
375375
error!("error writing 100-continue: {:?}", e);

0 commit comments

Comments
 (0)