fix for #80, checking for body before setting content-type header