about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-05-23 21:53:19 +0000
committerEric Wong <normalperson@yhbt.net>2011-05-23 22:58:50 +0000
commit67e1fa9f9535ad009d538b8189bb3bdec0e5f79c (patch)
tree265d97d6ad4fd31f4f4e6c128f2cb0a6df411481
parent1b31c40997ff8b932a457275e9a2f219de1d32c8 (diff)
downloadunicorn-67e1fa9f9535ad009d538b8189bb3bdec0e5f79c.tar.gz
Ruby 1.9.3dev (trunk) requires it if the string size
is unchanged.
-rw-r--r--ext/unicorn_http/unicorn_http.rl1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/unicorn_http/unicorn_http.rl b/ext/unicorn_http/unicorn_http.rl
index 116b2b2..56c42af 100644
--- a/ext/unicorn_http/unicorn_http.rl
+++ b/ext/unicorn_http/unicorn_http.rl
@@ -878,6 +878,7 @@ static VALUE HttpParser_filter_body(VALUE self, VALUE buf, VALUE data)
   dlen = RSTRING_LEN(data);
 
   StringValue(buf);
+  rb_str_modify(buf);
   rb_str_resize(buf, dlen); /* we can never copy more than dlen bytes */
   OBJ_TAINT(buf); /* keep weirdo $SAFE users happy */