api.c: libhttpd crash on invalid HTTP headers

Added patch fix for second hand of the bug (http://dev.wifidog.org/ticket/471).

This patch comes from benoigt.
Merge pull request #18 from florida63/test_wifidog

libhttpd crash on invalid HTTP headers (second part of the bug).