Re: Content-Length header with HEAD response

2013-05-29 Thread Hagai Avrahami
Hi I thought HEAD should behave as GET only in case of success after reading the RFC I understand it's should be the same on any response Thanks On Wed, May 29, 2013 at 3:10 PM, Maxim Dounin wrote: > Hello! > > On Wed, May 29, 2013 at 02:49:46PM +0300, Hagai Avrahami wrote: > > > Hi > > > > I a

Re: Content-Length header with HEAD response

2013-05-29 Thread Maxim Dounin
Hello! On Wed, May 29, 2013 at 02:49:46PM +0300, Hagai Avrahami wrote: > Hi > > I am trying to configure Nginx to deny HTTP HEAD requests > > 1. By adding the following to configuration file > > if ($request_method !~ ^(GET)$) { > return 405; > } > > 2. Explicitly in the module > > if (!

Content-Length header with HEAD response

2013-05-29 Thread Hagai Avrahami
Hi I am trying to configure Nginx to deny HTTP HEAD requests 1. By adding the following to configuration file if ($request_method !~ ^(GET)$) { return 405; } 2. Explicitly in the module if (!(r->method & (NGX_HTTP_GET))) { return NGX_HTTP_NOT_ALLOWED; } Nginx returns 405 status c