http: call rb_str_modify before rb_str_resize