Fix parsing of request headers