Implementation of the HTTP content negotiation algorithm
