openresty / echo-nginx-module

An Nginx module for bringing the power of "echo", "sleep", "time" and more to Nginx's config file
http://wiki.nginx.org/NginxHttpEchoModule
BSD 2-Clause "Simplified" License
1.17k stars 254 forks source link

content_handler should work also on TLS webserver #95

Open andreasschulze opened 4 years ago

andreasschulze commented 4 years ago

consider this /echo.inc:

location {
  default_type text/plain; 
  echo_duplicate 1 $echo_client_request_headers;
  echo "\r";
  echo_read_request_body;
  echo_request_body; 
  echo_flush;
}
server {
  listen *:80;
  include /echo.inc;
}
server {
  listen *:443 ssl http2;
  ssl_certificate /cert.pem;
  ssl_certificate_key /key.pem;
  include /echo.inc;
}

the expected result happen only on port HTTP but not on HTTPS