fcgi: use h2o_buffer_try_reserve for buffering
The fcgi response (up to 64KB) is accumulated into the response buffer
using h2o_buffer_reserve. Instead use h2o_buffer_try_reserve. Other
invocations of h2o_buffer_reserve can remain as it is because the upper
bound of the allocation size is known to be 64KB.
@@ -562,8 +562,7 @@ static void append_content(struct st_fcgi_generator_t *generator, const void *sr
}
generator->leftsize -= len;
}
-
- h2o_iovec_t reserved = h2o_buffer_reserve(&generator->resp.receiving, len);
+ h2o_iovec_t reserved = h2o_buffer_try_reserve(&generator->resp.receiving, len);
memcpy(reserved.base, src, len);
generator->resp.receiving->size += len;
}
