Fix getting http headers