search for: httphandler

Displaying 20 results from an estimated 46 matches for "httphandler".

2006 Dec 21
1
dealing with multipart forms in a Mongrel::HttpHandler
Hi everyone, Is there an easy way to parse multipart form requests from within a Mongrel::HttpHandler subclass or do I need to break out RFC 2388 and a bunch of regexps? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061221/9e756aa8/attachment.html
2007 Jul 24
4
GemPlugin or Mongrel::HttpHandler subclass
...m working with a technology standard (specific to the commercial print industry) by which each element within the workflow has bi- directional HTTP messaging. As each side needs a http server, I thought I could either: a) use a gem plugin to modify the behavior of mongrel b) subclass Mongrel::HttpHandler In short, its xml messaging between two points; each with a HTTP client and HTTP server, a sort of xml conversation. I was thinking that I could leverage mongrel to do this...? I have no idea which method would work best (I am thinking the subclass route?) but I was thinking I could set up...
2007 Nov 09
0
starting/stopping/registering Mongrel for HttpHandler
Hi. I am currently learning Ruby and writing an app that simply uses Mongrel''s HttpHandler class to create simple ruby servlets. At the end I have been using code similar to the example in simpletest.rb: h = Mongrel::HttpServer.new("0.0.0.0", "3000") h.register("/test", SimpleHandler.new) #h.register("/files", Mongrel::DirHandler.new(".&qu...
2006 Jun 14
0
uninitialized constant Mongrel::HttpHandler (NameError)
I am trying to get a basic apache 2.0.55 + mongrel + rails app configuration setup and i keep getting this: # mongrel_rails /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:28: uninitialized constant Mongrel::HttpHandler (NameError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:5 from /usr/local/bin/mongrel_rails:18 It looks like the http11.so is not getting compil...
2006 Dec 21
0
unitinialized constant Mongrel::HttpHandler (NameError)
Using RailsLive CD (PCLinuxOS) installed to HD. ''gem install mongrel'' reported: Successfully installed mongrel-0.3.13.4. though there is one error: make: *** [/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/http11.so] Error 127 Google is no help for this one as the only reference to this error I could find suggested it might be solved by installing libc, for which I
2006 Nov 26
2
Writing a mod_put HttpHandler
...ct, 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 (only the params). In other words, mongrel would need to stream the entire upload to a tempfile before it hands off to my "PUT handler," right? If that''s the case, any suggestions on how I coul...
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...
2008 Jun 03
9
clients hang on large PUTs to Mongrel::HttpHandler-based web service
Hi folks, I have a problem with a storage web service our group wrote using Mongrel::HttpHandler We have a consistent problem when using http PUT to this service when the data is larger than about 4 GB. The web service actually retrieves and processes the data, but the clients hang - the TCP connection is still in the ESTABLISHED state on the client side, but the TCP session no longer exists...
2006 May 24
8
Rails, Ubuntu dapper & Mongrel > uninitialized constant Mongrel::HttpHandler error
This on Ubuntu testing with the default ruby1.8 package, RubyForge current gems, mongrel...this look familiar to anyone?? andre@andre:~/rails_apps/depot$ mongrel_rails /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/lib/mongrel/rails.rb:44: uninitialized constant Mongrel::HttpHandler (NameError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.13/bin/mongrel_rails:5 from /usr/bin/mongrel_rails:18 Thanks, Andre -------------- next part -------------- An HTML attachment was...
2006 Dec 23
2
exception logging
Hi all- I''m running mongrel with a tiny HttpHandler that hooks into a larger library I''m working on. I''ve run into a snag with trying to debug with it in that I''m not entirely sure how to get the exception logs of errors that are raised. All I get to stderr is this: Fri Dec 22 17:16:14 -0800 2006: ERROR: Couldn'...
2006 Dec 05
7
mongrel and long lived connections
Hi, I found this article http://cyll.org/blog/tech/2006-08-09-themongrelcomet.html on mongrel and COMET very interesting. I ran the code, and it worked just as Christopher explained. The one thing I don''t understand is why mongrel can only handle 1 connection at a time. I thought that mongrel used a thread per connection. It appears that each registered handler can only handle 1
2006 Nov 27
5
win32 problems
I''m setting up a Rails app for a client that uses Windows. I''m getting this error: c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.18/lib/mongrel/rails.rb: 32: uninitial ized constant Mongrel::HttpHandler (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:21:in `re quire'' from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.18/bin/ mongrel_rails:10 from c:/ruby/bin/mongrel_rails:18 Setup: Windows Server 2003, Standard Rails 1.1.6 Mongrel 0....
2006 Apr 07
1
HTTP 1.1 parser and non-standard request methods
...ser hardcodes which request methods it considers valid, so it blocks non-standard request methods like MKCOL, PROPFIND, etc. i''m not familiar with the type of grammar being used for the parser, but is it possible to defer the request method validation to a later point, possibly inside the HttpHandler#process callback? thanks, doug -- "Contrary to what most people say, the most dangerous animal in the world is not the lion or the tiger or even the elephant. It''s a shark riding on an elephant''s back, just trampling and eating everything they see." -- Jack Handey
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 p...
2006 May 07
1
Installing on OS X
Hi, I''ve just installed Mongrel 3.12.4 on OS X, and had one little difficulty: I kept getting an error message saying that HTTPHandler didn''t exist, maybe it was Mongrel, I don''t remember. Turns out that there was a lot more missing than that, so it doesn''t really matter. What was happening is that http11 was not installing and the "require ''http11''" failed silently, an...
2008 Jan 04
1
Howto write a mongrel handler for a CGI app using CGIWrapper
...;) if user == '''' foo.check(uri) else foo.check(uri, user, pass) end foo.report ]]] Here is the mongrel version, using Mongrel::CGIWrapper : [[[ require ''mongrel'' require ''cgi'' require ''foo'' class AppHandler < Mongrel::HttpHandler def process(request, response) cgi = Mongrel::CGIWrapper.new(request, response) if !cgi[''uri''] || (cgi[''uri''] == '''') response.start(200, true) do |header, body| Foo.error("URI argument is required", output=bod...
2006 Jun 13
1
mongrel_upload_progress & plugin question in general
...wrote my own test plugin to mess around with the general plugin system and what I think it is is that the handlers aren''t registering with a particular uri. In the Rdoc for mongrel there is the following code: require ''mongrel'' class SimpleHandler < Mongrel::HttpHandler def process(request, response) response.start(200) do |head,out| head["Content-Type"] = "text/plain" out.write("hello!\n") end end end h = Mongrel::HttpServer.new("0.0.0.0", "3000") h.register("/...
2007 Dec 03
1
Originating Client Request
...: en-us Accept-Encoding: gzip, deflate Cookie: _dk_session_id=5d1bb099d2a1ba28f06a0bd60e091e3d Connection: keep-alive Host: localhost:8000 ...this represents the correct raw originating headers... When I try implementing the same thing using a Mongrel handler... class ClientHandler < Mongrel::HttpHandler def process(request, response) response.start(200) do |head, out| head["Content-Type"] = "text/plain" out.write request.params end end end ... I get the CGI headers (request.body is empty, is that correct?) ... SERVER_NAMElocalhostPATH...
2007 Nov 20
4
Win32 service question
Hi All, First, I''m new to the list, so I''d like to say hello to all fellow mongrelists :) Second, I''d like to ask you if there''s any way to make a simple mongrel script run multithreaded? No rails, just plain old class MyHandler < Mongrel::HttpHandler . . . h = Mongrel::HttpServer.new("127.0.0.1", "80") stuff. Since win32 lacks fork, I don''t know if I can make it process multiple request simultaneously. I''ve read about the mongrel rails service thing, but that''s only for rails, if I''m not...
2007 Jan 23
4
Want feedback on Mongrel patch for handling partial PUT requests
...ere''s no chance this will be accepted into trunk, please let me know. I''d be happy to provide this as a "plugin" to monkey-patch mongrel for any people interested in this functionality. So, the patch touches three (3) classes and makes minor modifications. 1. class HttpHandler Adds 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. c...