vitrue/dzl — pull request #15 by akira (2012-05-11 17:25:44+00:00)
Title: Handle empty body with GET request and content-type application/json

If you send a request with Content-Type application/json and empty body it breaks. Fix this case by checking for empty body before parsing json. Also included spec for this.

Here is stack trace:
```
JSON::ParserError: A JSON text must at least contain two octets!
/Users/ak/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/json/common.rb:146:in `initialize'
/Users/ak/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/json/common.rb:146:in `new'
/Users/ak/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/json/common.rb:146:in `parse'
/Users/ak/.rvm/gems/ruby-1.9.2-p290/bundler/gems/dzl-397e83337441/lib/dzl/request.rb:72:in `preformatted_params'
/Users/ak/.rvm/gems/ruby-1.9.2-p290/bundler/gems/dzl-397e83337441/lib/dzl/request.rb:30:in `params'
/Users/ak/.rvm/gems/ruby-1.9.2-p290/bundler/gems/dzl-397e83337441/lib/dzl/rack_interface.rb:110:in `log_request'
/Users/ak/.rvm/gems/ruby-1.9.2-p290/bundler/gems/dzl-397e83337441/lib/dzl/rack_interface.rb:38:in `call'
```