api.c: libhttpd crash on invalid HTTP headers

Added patch fix for second hand of the bug (http://dev.wifidog.org/ticket/471).

Benoigt thank you for this patch.  ("We must render to Caesar what belongs to Caesar and to God what is God's).