search for: http_body

Displaying 4 results from an estimated 4 matches for "http_body".

2008 Jan 14
3
Reading HTTP Request parameters
...{"a"=>1,"b"=>2}) But in the handler I can''t read the parameters one by one, I can read the entire String only : class Serveur class MyHandler < Mongrel::HttpHandler def process(req, resp) ... @params=req.params @params.http_body ... end end ... end @params.http_body give me : a=1&b=2 which is a string I would like a code which return me 1 for something[:a] and 2 for something[:b]... thanks -- Posted via http://www.ruby-forum.com/.
2009 Feb 13
2
téléchargement et affichage d'image avec HtmlWindow
2007 Jan 23
4
Want feedback on Mongrel patch for handling partial PUT requests
...nterrupted? 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...
2006 Nov 26
2
Writing a mod_put HttpHandler
I''m looking at writing a Mongrel handler that mimics the behavior of the Apache mod_put [1]. It allows for the streaming upload of very large (GB) files; it also supports resumable upload. Before I get too involved, I''d like to ask if my reading of the mongrel source code is correct, i.e. what I want to do isn''t currently possible. Looking at the class