This ensures that even if some wonky string encoding is passed as the body of a HTTP reply, it will be treated as binary. Fixes some of the HTTP Server exploits on Windows
git-svn-id: file:///home/svn/framework3/trunk@10653 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
213b188fdb
commit
dbbd0dc07e
|
@ -165,7 +165,9 @@ class Packet
|
|||
# Converts the packet to a string.
|
||||
#
|
||||
def to_s
|
||||
content = self.body.dup
|
||||
# Duplicate and make sure this is 8BIT safe for Ruby 1.9
|
||||
content = self.body.unpack("C*").pack("C*")
|
||||
|
||||
# Update the content length field in the header with the body length.
|
||||
if (content)
|
||||
if !self.compress.nil?
|
||||
|
|
Loading…
Reference in New Issue