Project

General

Profile

Actions

Bug #203

closed

net/http sends wrong content-length

Added by Anonymous over 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
Backport:

Description

=begin
String#size returns count of chars, not count of bytes.

It is necessary to use bytesize method.

Index: lib/net/http.rb

--- lib/net/http.rb (revision 17614)
+++ lib/net/http.rb (working copy)
@@ -1643,7 +1643,7 @@
private

   def send_request_with_body(sock, ver, path, body)
  •  self.content_length = body.length
    
  •  self.content_length = body.bytesize
     delete 'Transfer-Encoding'
     supply_default_content_type
     write_header sock, ver, path
    

=end

Actions #1

Updated by ko1 (Koichi Sasada) about 16 years ago

  • Assignee set to aamine (Minero Aoki)

=begin

=end

Actions #2

Updated by aamine (Minero Aoki) about 16 years ago

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

=begin
Applied in changeset r18518.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0