Echo-nginx-module and HTTP2


#1

Hello,

The echo module (https://github.com/openresty/echo-nginx-module / v0.58)
produce segfaults while accessing the following location:

# echo back the client request
location /echoback {
  echo_duplicate 1 $echo_client_request_headers;
  echo "\r";

  echo_read_request_body;

  echo_request_body;
}

that happen only if http2 is enabled (usually at https servers).


worker process 20658 exited on signal 11

Andreas


#2

Hello!

On Thu, Jan 28, 2016 at 1:45 AM, A. Schulze wrote:

 echo_request_body;

}

that happen only if http2 is enabled (usually at https servers).

Yeah, the ngx_echo module does not support the HTTP/2 mode yet (as the
maintainer, I’ve never tested it anyway). Patches welcome and
volunteers welcome :slight_smile:

Best regards,
-agentzh


#3

Yichun Z. (agentzh):

Yeah, the ngx_echo module does not support the HTTP/2 mode yet (as the
maintainer, I’ve never tested it anyway). Patches welcome and
volunteers welcome :slight_smile:

thanks,

I could not support with patches but would do some beta testing.

Just to have ask:
disabling http2 for a location is not possible, isn’t it?

Andreas


#4

Hello,

I was doing some debugging and though I haven’t found a fix. The problem
is
in the ngx_http_echo_client_request_headers_variable() function
c->buffer
is NULL when http v2 is used for some reason (internal to nginx).


Kurt C.
https://www.x64architecture.com


#5

Hello!

On Fri, Jan 29, 2016 at 8:40 PM, Kurt C. wrote:

I was doing some debugging and though I haven’t found a fix. The problem is
in the ngx_http_echo_client_request_headers_variable() function c->buffer is
NULL when http v2 is used for some reason (internal to nginx).

This is expected since the HTTP/2 mode of NGINX reads the request
header into a different place. We should branch the code accordingly.

Regards,
-agentzh


#6

Hello!

On Thu, Jan 28, 2016 at 11:19 PM, A. Schulze wrote:

I could not support with patches but would do some beta testing.

Thanks.

Just to have ask:
disabling http2 for a location is not possible, isn’t it?

Nope.

Regards,
-agentzh


#7

I also had the segfaults with the echo module.
After googling for a while I solved the issue following this nginx echo
module guide:
https://tutorials.technology/tutorials/31-how-to-install-nginx-echomodule-latest-version.html