updates proxy to always allocate 4K buffers on socket read

This commit is contained in:
Joe Bryan 2018-06-07 22:57:49 -04:00
parent ad424fcbda
commit 52503a2add

View File

@ -989,8 +989,11 @@ _proxy_alloc(uv_handle_t* had_u,
size_t len_i,
uv_buf_t* buf)
{
void* ptr_v = c3_malloc(len_i);
*buf = uv_buf_init(ptr_v, len_i);
// len_i is always 64k, so we're ignoring it
// using fixed size 4K buffer for
// XX consider h2o_buffer_t, a pool, or something XX
void* ptr_v = c3_malloc(4096);
*buf = uv_buf_init(ptr_v, 4096);
}
/* _proxy_write_free(): free uv_write struct and linked buffer