Send 500 on null headers

see #1403 issue