jshttp / negotiator

An HTTP content negotiator for Node.js
MIT License
309 stars 33 forks source link

mediaType: handle invalid provided content types #21

Closed benesch closed 10 years ago

benesch commented 10 years ago

If a user specifies an invalid content type

new Negotiator(req).mediaType(['boom'])

negotiator blows up with a null pointer error. Handle this case by ignoring the invalid provided content type.

federomero commented 10 years ago

Thanks @benesch

benesch commented 10 years ago

You bet. Thanks!