ruby/ruby — pull request #201 by gregors (2012-10-22 03:43:50+00:00)
Title: set content-length to zero on empty post requests

It is bad form to not set the content-length header on empty post requests. This will most likely end with a 411 response from the server. Sometimes post requests will be empty e.g. the initial request during a challenge-response authentication scenario.

I've also included a test. It checks to see that webrick does not return the 411 response code. This is a resubmitted pull request. I initially dev'd on the 1.9.3 branch pull request #200. Sorry about that - still trying to figure out the workflow around here.