Echo-nginx-module and HTTP2

Hello,

The echo module (GitHub - openresty/echo-nginx-module: An Nginx module for bringing the power of "echo", "sleep", "time" and more to Nginx's config file / 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

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

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

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

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

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

I also had the segfaults with the echo module.
After googling for a while I solved the issue following this nginx echo
module guide: