Unexptected return code

Maxim Dounin mdounin at mdounin.ru
Wed Nov 9 10:02:23 UTC 2016


Hello!

On Tue, Nov 08, 2016 at 11:27:36PM -0800, lists at lazygranch.com wrote:

> I only serve static pages, hence I have this in my conf file:
> 
> -----------------------
> ## Only allow these request methods ##
>      if ($request_method !~ ^(GET|HEAD)$ ) {
>          return 444;
>      }
> ----------------
> Shouldn't the return code be 444 instead of 400?
> ----------------------------------------
> 400 111.91.67.118 - - [09/Nov/2016:05:18:38 +0000] "CONNECT search.yahoo.com:443 HTTP/1.1" 173 "-" "-" "-"
> -------------------------------
> 
> This is more of a curiosity rather than an issue. 

There is no support for CONNECT method in nginx.  As a result, 
CONNECT requests are rejected as invalid while parsing a request 
line (as there is no URI nginx expects to see).

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list