search for: httprequest

Displaying 20 results from an estimated 74 matches for "httprequest".

2006 Mar 20
1
RJS & IE Woes
..., ''fork_detail_div'', :duration => 0.75 page.delay (1) do page.replace_html ''fork_detail_div'', '''' end I get an error in WEBRIK [2006-03-21 00:31:08] ERROR Errno::EINVAL: Invalid argument c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `__send__'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `_read_data'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `timeout'' c:/ruby/lib/ruby/1.8/timeou...
2006 Jul 20
0
Routing error
Hi! I''ve appended this to the standard config/routing.rb: map.connect '':id/:action'', :controller => ''cms/publish'' and it works but gives an error with every single HTTPrequest, even the ones matching the standard (and higher priority) routes. As an alternative I tried implementing it using map.connect ''*path'', :controller => ''application'', :action => ''handle_req'' and the do a redirect in that function, much...
2006 Jun 27
1
Errno::EINVAL: Invalid arguments - IE crash
Hi, When I run my app on IE, it crashes everytime. However, when running on Firefox, it is perfectly fine. I saw the following error on the my server. [2005-11-15 10:45:20] ERROR Errno::EINVAL: Invalid argument c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `__send__'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `_read_data'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `timeout'' c:/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout'' c:...
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...
2006 Feb 16
1
file_column problem
...51.668000.2496/BIO_Pic.jpg" 127.0.0.1 - - [16/Feb/2006:12:35:51 Eastern Standard Time] "POST /user/updateyourpic/ HTTP/1.1" 302 101 http://localhost:3000/user/yourpic -> /user/updateyourpic/ [2006-02-16 12:35:52] ERROR Errno::EINVAL: Invalid argument c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `__send__'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `_read_data'' c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `timeout'' c:/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout''...
2008 Jan 14
3
Reading HTTP Request parameters
Hello I''ve a client which send this request to a mongrel HTTPHandler : res=Net::HTTP.post_form(URI.parse(''http://localhost:3000/test''),{"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)
2006 Feb 22
0
Can you make an HTTP request inside an Ajax action?
...calhost:3000/main/ -> /javascripts/prototype.js [2006-02-22 06:08:11] ERROR ThreadError: timeout within critical session /usr/local/lib/ruby/1.8/timeout.rb:49:in `timeout'' /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'' /usr/local/lib/ruby/1.8/webrick/httprequest.rb:329:in `_read_data'' /usr/local/lib/ruby/1.8/webrick/httprequest.rb:340:in `read_line'' /usr/local/lib/ruby/1.8/webrick/httprequest.rb:240:in `read_header'' /usr/local/lib/ruby/1.8/webrick/httprequest.rb:88:in `parse'' /usr/local/li...
2006 Nov 26
2
Writing a mod_put HttpHandler
...od_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 HttpRequest I see that request bodies larger than Mongrel::MAX_BODY get streamed to a tempfile before they are handed off to any handlers registered in the chain. Things were looking up for me when I saw the HttpHandler#request_progress call, but it doesn''t hand the body off to the handler (on...
2010 Apr 27
3
[PATCH] Add worker interrogation via INFO signals
Hey all, Below is a proposed patch I worked on over the weekend. Just adding a note here to mention that I''m currently not a subscriber to the mailing list, so please CC me on any replies. Let me know what you all think. This change was made on a local topic branch off of the maint branch. If you''d like to view the change on GitHub, you can do so here:
2007 Nov 11
1
Passing from data via POST
Mongrel Users: How does the HttpHandler process() method deal with data passed via POST? The HttpRequest object captures all GET params appended to an URL, but I just tried to retrieve data passed via POST and it came up nil. that is, I assumed the HttpRequest object contained the param named in the html form and its value.But the POST passed params are not found in the request object. Please advise....
2007 Jan 21
1
Strange Ajax Error Since Upgrade
...someone here can help. Whenever I try to execute any Ajax call whether as a form request or a link_to_remote link I get the following error: ------------------- FORM REQUEST ------------------- [2007-01-21 23:15:26] ERROR bad header ''"{\n"''. [2007-01-21 23:15:26] ERROR HTTPRequest#fixup: WEBrick::HTTPStatus::LengthRequired occured. 127.0.0.1 - - [21/Jan/2007:23:15:26 GMT] "POST /picture/add_comment/13 HTTP/1.1" 400 301 - -> /picture/add_comment/13 ------------------- LINK_TO_REMOTE REQUEST ------------------- [2007-01-21 23:17:26] ERROR bad header ''&qu...
2006 May 30
2
Mongrel Bug
Mongrel''s tempfile generation on win32 is broken meaning large files can''t be uploaded. On line 198 of mongrel.rb (0.13.3) HttpRequest#initialize the tempfile function is called:       if clen &gt; Const::MAX_BODY         @body = Tempfile.new(self.class.name)         @body.binmode       else Unfortunately this also includes the module name as the example shows: Mongrel::HttpRequest2496.9 Win32 doesn''t allow the...
2007 May 15
9
NS_ERROR_NOT_AVAILABLE
Exception:[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: prototype.js :: anonymous :: line 920" data: no] Hi, i read about this problem and i know, that calling nsIXMLHttpRequest.status causes it. prototype has a try-catch-block around this. But w...
2006 Nov 13
6
mongrel_upload_progress question/possible suggestion
...nfo in my app. Thus, the ability for path_info to be a regex instead of just a string, thus allowing for: return unless params[''PATH_INFO''] =~ @path_info && params[Mongrel::Const::REQUEST_METHOD] == ''POST'' && upload_id = Mongrel::HttpRequest.query_parse (params[''QUERY_STRING''])[''upload_id''] Then I just update my handler like so: uri "/", :handler => plugin("/handlers/upload", :path_info => %r{/account/\d/\d/media/upload}), :in_front => true And everything works fin...
2007 Dec 28
6
Arbitrary system files readable in 1.0.4 - 1.1.2
...ity in one of my web apps that was running Mongrel 1.1.2 where I could go to URIs like /.%252e/.%252e/.%252e/.%252e/.%252e/.%252e/.%252e/etc/passwd and it would serve the actual /etc/passwd file. The issue seems to be in lib/mongrel/handlers.rb in the change from 1.0.3 to 1.0.4 req_path = HttpRequest.unescape(path_info) - if @path - req_path = File.expand_path(File.join(@path, path_info), @path) - else - req_path = File.expand_path(req_path) - end - - if req_path.index(@path) == 0 and File.exist? req_path - # it exists and it''s in the right loca...
2011 Sep 26
2
undefined method `options' for #<EventMachine::HttpClien
...n = OAuth::AccessToken.new(consumer,ACCESS_TOKEN,ACCESS_TOKEN_SECRET) oauth_params = {:consumer => consumer, :token => access_token} EventMachine.run do # now, let''s subscribe to twitter site stream # check informaiton on twitter site http = EventMachine::HttpRequest.new(''http://stream.twitter.com/1/statuses/sample.json'').get oauth_helper = OAuth::Client::Helper.new(http, oauth_params) http.options[:head] = (http.options[:head] || {}).merge!({"Authorization" => oauth_helper.header}) http.callback { p h...
2006 Oct 19
8
Mongrel::HttpHandlerPlugin
Hi, I''m trying to write a file upload monitor for mongrel that uses juggernaut to alert the browser of a change. I''m writing a plugin that uses Mongrel::HttpHandlerPlugin but it looks like the only method that gets called is process and that is only when the upload has finished. I''m setting the following: @request_notify = true But I am still only getting process to
2006 Aug 20
14
http parser
...thought I''d let you know that your http parser worked great for creating an http protocol handler for Eventmachine. It wouldn''t take that much effort to use Eventmachine for Mongrel, might be worth a shot just to see how it does. A few things would need to be restructered, like HttpRequest where you read the rest of the body, and calling the handler. But it wouldn''t be all that much work I don''t think. Took me about an hour to create a working http server with Eventmachine, your parser, and subclassing HttpRequest to get rid of the socket reading. I''ll s...
2006 Mar 10
0
WEBrick crashing
...b::DRbServer#main_loop 0.00 6.55 0.00 4 0.00 0.00 Hash#default 0.00 6.55 0.00 1 0.00 0.00 WEBrick::HTTPServer#run 0.00 6.55 0.00 2 0.00 0.00 Array#last 0.00 6.55 0.00 2 0.00 0.00 WEBrick::HTTPRequest#[] 0.00 6.55 0.00 1 0.00 0.00 WEBrick::HTTPServer#servic e 0.00 6.55 0.00 2 0.00 0.00 Module#const_get 0.00 6.55 0.00 2 0.00 0.00 Dependencies.loaded 0.00 6.55 0.00 1 0.00 0.00 DRb::DRbSe...
2007 Jan 23
4
Want feedback on Mongrel patch for handling partial PUT requests
...a single method called #accept_partial_requests? which is false by default since most handlers do NOT want to handle a partial request. Those that do can simply override this method in the subclass. Used in HttpServer#process_client for determining if a handler should get called. 2. class HttpRequest Changes the logic in the #read_body method so it no longer deletes the TempFile and sets @body to nil as a "signal" that the request was interrupted. Adds a #attr_reader called #interrupted? for use outside the class along with the appropriate initialization statement (this is the...