test/stallion.rb in em-http-request-0.2.1 vs test/stallion.rb in em-http-request-0.2.2
- old
+ new
@@ -85,10 +85,14 @@
elsif stable.request.head?
stable.response.status = 200
elsif stable.request.post?
- stable.response.write stable.request.body.read
+ if stable.request.path_info == '/echo_content_type'
+ stable.response.write stable.request.env["CONTENT_TYPE"]
+ else
+ stable.response.write stable.request.body.read
+ end
elsif stable.request.path_info == '/set_cookie'
stable.response["Set-Cookie"] = "id=1; expires=Tue, 09-Aug-2011 17:53:39 GMT; path=/;"
stable.response.write "cookie set"
\ No newline at end of file