Project

General

Profile

Actions

Bug #10715

closed

WEBrick::HTTPResponse#to_s calls send_response(), and make debugging quite difficult.

Added by yoshiokatsuneo (Tsuneo Yoshioka) over 9 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:67428]

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0