Merge pull request #666 from derhansen/master

Uses code 400 instead of 44 in modsecurity.conf-recommended
iis: Uses code 400 instead of 44 in modsecurity.conf

Following the recent changes that has been made on:
modsecurity.conf-recommended
Fix segmentation fault if writing to audit log fails

A segmentation fault occurs if concurrent audit log format is enabled
(SecAuditLogType Concurrent) and writing to the log fails.
Log why writing to audit log failed

Add error description from apr_strerror() to message that is logged if
writing to audit log failed.
Fixes UTF8 to Unicode conversion bug in 4-byte encodings
Adds utf8toUnicode.t to our unit tests

A bug was reported related to our utf8toUnicode transformation, so, adding this
unit test to confirm the bug and to check whenever it is fixed. Bug #671.
Adds REQUEST_FULL and REQUEST_FULL_LENGTH variables

This variable is a combination from REQUEST_LINE, REQUEST_HEADERS and
REQUEST_BODY (if any). Expects for \n\n in between each of those values.
First version of the status engine implementation

The Status Engine allow the measurements of how many ModSecurity
instances are running around the world, as long as information
on how many times it had been restarted and so on. Everytime that
the server is started it perform a DNS query that is redirected
to our servers, that query constains information about the
ModSecurity version and it dependencies versions. It also sends a
unique indetification generate locally for the server, avoiding
counting the same server twice while generating the statistics.
This id is a sha-1 hash of the machine name + mac address of the
first network adapter. In this commit it is enabled by default,
in the release will be a configuration option to disable this
functionality. It also important to cite that the information
gather by this query will be also available in ModSecurity website
public open via a JSON stateless API. There will be an fancy
heatmap as well.
Adds SecStatusEngine On/Off switch

Add the possibility to turn the Status Engine On or Off using the
directive SecStatusEngine [On/Off]. By default it is On.
Adds support to status engine on IIS version

Fixes on the windows versions: build, mac address and machine name retrieval
Places StatusEngine to be Off by default

StatusEngine is now marked as Off by default. This patch also adds the
SecStatusEngine directive to our recommend configuration file.
Adds regression test to SecStatusEngine

Just checking the error log while have SecStatusEngine set to On in a first
test and Off in a second.
Adds modsecStatusEngineCall to standalone API

In ModSecurityIIS the configuration is loaded upon the first request
is received. In other words, SecStatusEngine value can be only
loaded once the first request hit the server, and so, the status
function was moved to proceed just after the configuration got loaded.
This update is IIS only.
Optimization on the status engine call

The status string was too long. By removing meaningless stuff, such as: runtime
version of Lua, we have reduced the length of the status string. Limitations
were also placed regarding the size of the ModSecurity version. Big queries may
lead to failure, due to restrictions of "gethostbyname". There is also a bit of
code cosmetics in this patch: big functions were broken into smaller.
Added support for JSON body processor
Added sample JSON content-type rule
Makes the build system to look for yajl using a macro file

Now searching for yajl using find_yajl.m4 macro file instead
of using pkg-config directly. If YAJL was not found or if it
was disabled in the configure phase, the code will be compiled
without JSON support.
Supports the yajl version 2

Initially the code was made to support the yajl version 1. The
version 2 is now the default option in most of Linux distributions.
Adds support to JSON parser in the nginx module

Building with --enable-standalone-module was failing due
the lack of the reference to the msc_json.c file inside the
standalone/Makefile.am. This patch also place the dependency
of the yajl to the nginx module config script.
Adds JSON support on ISS port

The JSON parse is already supported in Nginx and Apache
versions. This patch adds support on the IIS port.