Actions
Bug #10715
closedWEBrick::HTTPResponse#to_s calls send_response(), and make debugging quite difficult.
Description
WEBrick::HTTPResponse#to_s calls send_response(), and this makes debugging very difficult.
If I run webrick on debugger or just do "print" debug, and show status of the object in some point,
then debugger or "print" may calls "to_s" and go to weird status (like setting content-length to zero and never changes).
I suggest to remove "to_s" method from WEBrick::HTTPResponse, and just directly call
"send_response" instead of "to_s" when needed.
Updated by jeremyevans0 (Jeremy Evans) about 5 years ago
It looks like WEBrick::HTTPResponse#to_s
is currently broken anyway (https://github.com/ruby/webrick/pull/20). I agree that it makes sense to remove the method, and added a pull request to do so (https://github.com/ruby/webrick/pull/22).
Updated by ko1 (Koichi Sasada) almost 5 years ago
- Status changed from Open to Closed
should we continue on github issue?
Actions
Like0
Like0Like0