search for: read_socket

Displaying 3 results from an estimated 3 matches for "read_socket".

Did you mean: thread_socket
2007 Feb 05
2
recv vs. read in HTTPRequest#read_socket
Hello all, The following change to Mongrel::HttpRequest: def read_socket(len) if !@socket.closed? data = @socket.recv(len) # <--- formerly @socket.read(len) if !data raise "Socket read return nil" elsif data.length != len raise "Socket read returned insufficient data: #{data.length}" else data end else...
2007 Jan 23
4
Want feedback on Mongrel patch for handling partial PUT requests
...def initialize # original code plus... self.interrupted? = false end # 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 wri...
2008 Feb 15
1
Socket read returned insufficient data
...sr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19 Thu Feb 14 16:40:14 UTC 2008: Error reading HTTP body: #<RuntimeError: Socket read returned insufficient data: 2314> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ http_request.rb:107:in `read_socket'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ http_request.rb:86:in `read_body'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/ http_request.rb:55:in `initialize'' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel.rb:149:in `pr...