Fix Bug: http parser error
After realloc memory, forgot to correct the mark of the http_parser. Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>main
parent
52b351f32e
commit
a3a2d7bdcb
|
@ -227,8 +227,11 @@ static void connection_read_cb(struct ev_loop *loop, ev_io *w, int revents)
|
|||
handshake_done:
|
||||
#endif
|
||||
|
||||
if (uh_buf_available(buf) < UH_BUFFER_SIZE)
|
||||
if (uh_buf_available(buf) < UH_BUFFER_SIZE) {
|
||||
int off = con->parser.mark - buf->base;
|
||||
uh_buf_grow(buf, UH_BUFFER_SIZE);
|
||||
con->parser.mark = buf->base + off;
|
||||
}
|
||||
|
||||
base = buf->base + buf->len;
|
||||
|
||||
|
|
Loading…
Reference in New Issue