Any body is here?
> On Mar 21, 2018, at 11:36, Haitao Lv wrote:
>
> Thank you for reviewing.
>
> And here is the patch that fix the breaking PROXY protocol functionality.
>
> Sorry for disturbing.
>
> diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http
->recv_buffer_size - 2 * NGX_HTTP_V2_STATE_BUFFER_SIZE;
+available = h2mcf->recv_buffer_size - h2c->state.buffer_used - 2 *
NGX_HTTP_V2_STATE_BUFFER_SIZE;
do {
p = h2mcf->recv_buffer;
-ngx_memcpy(p, h2c->state.buffer, NGX_HTTP_V2_STATE_BUFFER_SIZE);
:44:28 吕海涛 wrote:
>> Is there any one who would like to review this patch?
>>
>> 发自我的 iPhone
>>
>>> 在 2018年3月8日,08:42,Haitao Lv 写道:
>>>
>>> Sorry for disturbing. But I have to fix a buffer overflow bug.
>>> Here is the latest patch.
p, h2c->state.buffer, NGX_HTTP_V2_STATE_BUFFER_SIZE);
end = p + h2c->state.buffer_used;
+ if (h2c->state.buffer_used == 0) {
+ngx_memcpy(p, h2c->state.buffer, NGX_HTTP_V2_STATE_BUFFER_SIZE);
+}
n = c->recv(c, end, available);
> On
-available = h2mcf->recv_buffer_size - 2 * NGX_HTTP_V2_STATE_BUFFER_SIZE;
+available = h2mcf->recv_buffer_size - h2c->state.buffer_used - 2 *
NGX_HTTP_V2_STATE_BUFFER_SIZE;
do {
p = h2mcf->recv_buffer;
-ngx_memcpy(p, h2c->state.buffer, NGX_HTTP_V2_STATE_BUFFER_S
Hello, here is another patch(more sample) according Maxim Dounin advice.
Please offer your comment. Thanks.
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 89cfe77a..71bc7b59 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -17,6 +17,10 @@
Hello wbr,
Thank you for reviewing this patch.
> On Mar 5, 2018, at 23:06, Valentin V. Bartenev wrote:
>
> On Monday 05 March 2018 11:11:08 Haitao Lv wrote:
> [..]
>>> @@ -145,10 +152,6 @@ ngx_http_parse_request_line(ngx_http_request_t *r,
>>> ngx_buf_
> On Mar 5, 2018, at 17:02, Ruslan Ermilov wrote:
>
> On Mon, Mar 05, 2018 at 11:11:08AM +0800, Haitao Lv wrote:
> [...]
>>> @@ -145,10 +152,6 @@ ngx_http_parse_request_line(ngx_http_request_t *r,
>>> ngx_buf_t *b)
>>>case sw_sta
@wbr
> On Mar 4, 2018, at 13:49, Haitao Lv wrote:
>
> Here is the new patch
>
> diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
> index 9d8b6d79..c06ef7c7 100644
> --- a/src/http/ngx_http.c
> +++ b/src/http/ngx_http.c
> @@ -1197,6 +1197,7 @@ ngx_http_a
> On Mar 4, 2018, at 21:00, Valentin V. Bartenev wrote:
>
> On Sunday, 4 March 2018 05:53:36 MSK Haitao Lv wrote:
>> Hi, wbr,
>>
>> Thanks for your review. I don't know why I can't receive your email.
>> Let me reply directly.
>>
>>
n = c->recv(c, end, available);
@@ -410,6 +427,8 @@ ngx_http_v2_read_handler(ngx_event_t *rev)
end += n;
+do_state_handler:
+
h2c->state.buffer_used = 0;
h2c->state.incomplete = 0;
diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h
index
h2mcf->recv_buffer_size. If we got a buffered data larger than the
h2mcf->recv_buffer_size, we should send a bad request response.
If this feature can be accepted, I will send a new patch.
Thanks.
> On Mar 2, 2018, at 15:53, Haitao Lv wrote:
>
> # HG changeset patch
> # Use
# HG changeset patch
# User 吕海涛
# Date 1519976498 -28800
# Fri Mar 02 15:41:38 2018 +0800
# Node ID 200955343460c4726015180f20c03e31c0b35ff6
# Parent 81fae70d6cb81c67607931ec3ecc585a609c97e0
make http2 server support http1
diff -r 81fae70d6cb8 -r 200955343460 src/http/ngx_http.c
--- a/src/h
13 matches
Mail list logo