Displaying 1 result from an estimated 1 matches for "update_request_progress".
2007 Jan 23
4
Want feedback on Mongrel patch for handling partial PUT requests
...modify #read_body so it does NOT delete the @body if an
exception is raised.
def read_body(remain, total)
begin
# write the odd sized chunk first
@params.http_body = read_socket(remain % Const::CHUNK_SIZE)
remain -= @body.write(@params.http_body)
update_request_progress(remain, total)
# then stream out nothing but perfectly sized chunks
until remain <= 0 or @socket.closed?
# ASSUME: we are writing to a disk and these writes always
write the requested amount
@params.http_body = read_socket(Const::CHUNK_SIZE)...