Http digest

Pull request mainly to do a code review