Re: [PATCH] HTTP/2: make http2 server support http1

2018-03-05 Thread Haitao Lv
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

[nginx] HTTP/2: unknown frames now logged at info level.

2018-03-05 Thread Maxim Dounin
details: http://hg.nginx.org/nginx/rev/e80930e5e422 branches: changeset: 7225:e80930e5e422 user: Maxim Dounin date: Mon Mar 05 21:35:13 2018 +0300 description: HTTP/2: unknown frames now logged at info level. diffstat: src/http/v2/ngx_http_v2.c | 4 ++-- 1

[nginx] Style.

2018-03-05 Thread Maxim Dounin
details: http://hg.nginx.org/nginx/rev/1ab290cf5267 branches: changeset: 7224:1ab290cf5267 user: Maxim Dounin date: Mon Mar 05 21:35:08 2018 +0300 description: Style. diffstat: src/stream/ngx_stream_log_module.c | 3 ++- 1 files changed, 2 insertions(+), 1

Re: [PATCH] HTTP/2: make http2 server support http1

2018-03-05 Thread Maxim Dounin
Hello! On Mon, Mar 05, 2018 at 11:52:57PM +0800, Haitao Lv wrote: [...] > > Overall, the patch looks like a hack and introduces too much > > complexity for this feature. While I understand the reasoning, > > the proposed implementation cannot be accepted. > > Could you clarify that whether is

Re: [PATCH] HTTP/2: make http2 server support http1

2018-03-05 Thread Haitao Lv
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_t *b) >>>case

Re: [PATCH] HTTP/2: make http2 server support http1

2018-03-05 Thread Valentin V. Bartenev
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_t *b) > > case sw_start: > > r->request_start = p; > > > > -if (ch == CR || ch == LF) { > > -break; > > -

Re: [PATCH] HTTP/2: make http2 server support http1

2018-03-05 Thread Haitao Lv
> 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_start: >>>r->request_start = p;

Re: [PATCH] HTTP/2: make http2 server support http1

2018-03-05 Thread Ruslan Ermilov
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_start: > > r->request_start = p; > > > > -if (ch == CR || ch == LF) { > > -

Re: HTTP/2: used bitwise operation to replace division and modulo.

2018-03-05 Thread Ruslan Ermilov
On Sun, Mar 04, 2018 at 10:36:43PM -0800, tokers wrote: > # HG changeset patch > # User Alex Zhang > # Date 1520229178 -28800 > # Mon Mar 05 13:52:58 2018 +0800 > # Node ID 03ecef37a93d541e55802393636c101a4da14550 > # Parent 265c29b0b8b8c54b1c623268481ed85324ce3c79 >