From 67e1fa9f9535ad009d538b8189bb3bdec0e5f79c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 23 May 2011 21:53:19 +0000 Subject: http: call rb_str_modify before rb_str_resize Ruby 1.9.3dev (trunk) requires it if the string size is unchanged. --- ext/unicorn_http/unicorn_http.rl | 1 + 1 file changed, 1 insertion(+) (limited to 'ext') 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 */ -- cgit v1.2.3-24-ge0c7