Bug #559

WEBrick should use #bytesize instead of #size

Added by raspberry lemon over 6 years ago. Updated about 4 years ago.

Assignee:GOTOU Yuuzou
ruby -v: Backport:


Currently, WEBrick uses #size to figure out the content-length headers, which messes up responses with multibyte characters.

The attached patch stupidly replaces all instances of '.size' with '.bytesize'. It fixes the problem and doesn't appear to cause any problems.

patch.diff Magnifier (10.2 KB) raspberry lemon, 09/14/2008 02:46 AM


#1 Updated by Koichi Sasada over 6 years ago

  • Assignee set to GOTOU Yuuzou



#2 Updated by Yuki Sonoda over 6 years ago

  • Target version set to 1.9.1 Release Candidate



#3 Updated by Yukihiro Matsumoto over 6 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r20152.

Also available in: Atom PDF