Changeset 201

Show
Ignore:
Timestamp:
09/17/2007 16:35:05 (15 months ago)
Author:
zimbatm
Message:

Fixing POST with no body case. See bug #111.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/camping/webrick.rb

    r186 r201  
    4343    # Handler for WEBrick requests (also aliased as do_POST). 
    4444    def service(req, resp) 
    45         controller = @klass.run((req.body and StringIO.new(req.body)), req.meta_vars) 
     45        controller = @klass.run((req.body && StringIO.new(req.body)) || StringIO.new(), req.meta_vars) 
    4646        resp.status = controller.status 
    4747        @local_path = nil