⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (408 Bytes)
Bug #7957
» str_modify.rb
script to reproduce the issue (requires unicorn) -
normalperson (Eric Wong)
, 02/25/2013 09:54 PM
require
'unicorn'
hp
=
Unicorn
::
HttpParser
.
new
hp
.
add_parse
(
"PUT / HTTP/1.1
\r\n
Host:example.com
\r\n
"
\
"Transfer-Encoding: chunked
\r\n\r\n
"
)
dst
=
""
hp
.
filter_body
(
dst
,
"50
\r\n
"
+
(
"a"
*
41
))
tmp
=
dst
.
dup
# this line causes dst to be come shared
# this will raise: can't set length of shared string (RuntimeError)
# if dst is used as an IO#write arg
hp
.
filter_body
(
dst
,
(
"*"
*
39
)
<<
"
\r\n
"
)
« Previous
1
2
Next »
(1-1/2)
Loading...