Skip to content

Commit

Permalink
Fixing POST with no body case. See bug #111.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Pfenniger committed Sep 17, 2007
1 parent 023adfb commit 50ac52a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/camping/webrick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(server, klass)
end
# Handler for WEBrick requests (also aliased as do_POST).
def service(req, resp)
controller = @klass.run((req.body and StringIO.new(req.body)), req.meta_vars)
controller = @klass.run((req.body && StringIO.new(req.body)) || StringIO.new(), req.meta_vars)
resp.status = controller.status
@local_path = nil
controller.headers.each do |k, v|
Expand Down

0 comments on commit 50ac52a

Please sign in to comment.