version 1.1.1.1, 2013/10/14 10:32:48
|
version 1.1.1.2, 2014/06/15 20:20:06
|
Line 1034 found_header_end:
|
Line 1034 found_header_end:
|
|
|
weWant = con->request.content_length - dst_cq->bytes_in; |
weWant = con->request.content_length - dst_cq->bytes_in; |
|
|
assert(c->mem->used); | force_assert(c->mem->used); |
|
|
weHave = c->mem->used - c->offset - 1; |
weHave = c->mem->used - c->offset - 1; |
|
|
Line 1067 found_header_end:
|
Line 1067 found_header_end:
|
if (dst_c->file.fd == -1) { |
if (dst_c->file.fd == -1) { |
/* this should not happen as we cache the fd, but you never know */ |
/* this should not happen as we cache the fd, but you never know */ |
dst_c->file.fd = open(dst_c->file.name->ptr, O_WRONLY | O_APPEND); |
dst_c->file.fd = open(dst_c->file.name->ptr, O_WRONLY | O_APPEND); |
#ifdef FD_CLOEXEC | fd_close_on_exec(dst_c->file.fd); |
fcntl(dst_c->file.fd, F_SETFD, FD_CLOEXEC); | |
#endif | |
} |
} |
} else { |
} else { |
/* the chunk is too large now, close it */ |
/* the chunk is too large now, close it */ |
Line 1477 int connection_state_machine(server *srv, connection *
|
Line 1475 int connection_state_machine(server *srv, connection *
|
break; |
break; |
case HANDLER_COMEBACK: |
case HANDLER_COMEBACK: |
done = -1; |
done = -1; |
|
/* fallthrough */ |
case HANDLER_WAIT_FOR_EVENT: |
case HANDLER_WAIT_FOR_EVENT: |
/* come back here */ |
/* come back here */ |
connection_set_state(srv, con, CON_STATE_HANDLE_REQUEST); |
connection_set_state(srv, con, CON_STATE_HANDLE_REQUEST); |