Robert Iakobashvili made the 'master_buffer' get allocated first once it is
can/will be used as it then makes the common cases save 16KB of data for each easy handle that isn't used for pipelining.
This commit is contained in:
@@ -289,8 +289,13 @@ static void read_rewind(struct connectdata *conn,
|
||||
size_t show;
|
||||
|
||||
show = MIN(conn->buf_len - conn->read_pos, sizeof(buf)-1);
|
||||
memcpy(buf, conn->master_buffer + conn->read_pos, show);
|
||||
buf[show] = '\0';
|
||||
if (conn->master_buffer) {
|
||||
memcpy(buf, conn->master_buffer + conn->read_pos, show);
|
||||
buf[show] = '\0';
|
||||
}
|
||||
else {
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
DEBUGF(infof(conn->data,
|
||||
"Buffer after stream rewind (read_pos = %d): [%s]",
|
||||
|
Reference in New Issue
Block a user