mandril: fix rule names

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
HTTP: ranges fixes and implement 416 status code (fix #184)

The ranges parser did not validate properly the maximum offset
allowed, so if a requester set limit offset equal to file size it
continue processing, internally the sendfile(2) did not failed
returning always zero, this condition was not handled and for hence
that connections keeps running without ending, it could lead to a
DoS.

This patch improves the range headers validation, fix the validation
of mk_http_send_file() routine and when the range is not satisfied, it
will return the status code 416:

      HTTP/1.1 416 Requested Range Not Satisfiable

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
QA: add HTTP range tests 04 and 05

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Logger: open the logs with the close-on-exec flag
utils: Open the PID file with close-on-exec
epoll: Set close-on-exec on the epoll FDs.

Note that there is no race here, as connections are not accepted until everything is up.
liana: Set close-on-exec on new sockets
Logger: set the log pipes to close-on-exec

Likewise no race here, as connections aren't accepted yet.
Fix a few fcntl mismatches
fastcgi: Fix of request error log and signed compare warning.

Report request errors using PLUGIN_TRACE() instead of mk_info().
Fix signed compare in fcgi_config.c.
Use PLUGIN_TRACE() for "No chunks to free".

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
auth: Fix missing PLUGIN_TRACE argument.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
auth: Fix bug 188, add extra space for '\0' termination.

The buffer was too small to fit a terminator when there were no padding
on the base64 encoded string.
This patch makes base64_decode() terminate the decoded string by
default.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
HTTP/Post: do not force content-type (RFC2616 - 7.2.1)

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Merge branch 'master' of ssh://git.monkey-project.com/srv/git/monkey
mandril: Check URL in stage_30 instead of stage_20.

Assures that check is done on all pipelined requests.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
mandril: Add deny_hotlink /path directive.

Deny any access to /path if referer is another domain.

Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>