{"action":"created","issue":{"url":"https://api.github.com/repos/jshttp/negotiator/issues/35","labels_url":"https://api.github.com/repos/jshttp/negotiator/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/jshttp/negotiator/issues/35/comments","events_url":"https://api.github.com/repos/jshttp/negotiator/issues/35/events","html_url":"https://github.com/jshttp/negotiator/issues/35","id":58871610,"number":35,"title":"Parameter matching too strict","user":{"login":"daliwali","id":1175095,"avatar_url":"https://avatars.githubusercontent.com/u/1175095?v=3","gravatar_id":"","url":"https://api.github.com/users/daliwali","html_url":"https://github.com/daliwali","followers_url":"https://api.github.com/users/daliwali/followers","following_url":"https://api.github.com/users/daliwali/following{/other_user}","gists_url":"https://api.github.com/users/daliwali/gists{/gist_id}","starred_url":"https://api.github.com/users/daliwali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daliwali/subscriptions","organizations_url":"https://api.github.com/users/daliwali/orgs","repos_url":"https://api.github.com/users/daliwali/repos","events_url":"https://api.github.com/users/daliwali/events{/privacy}","received_events_url":"https://api.github.com/users/daliwali/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jshttp/negotiator/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/jshttp/negotiator/labels/investigate","name":"investigate","color":"bfdadc"}],"state":"open","locked":false,"assignee":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-02-25T09:10:04Z","updated_at":"2015-05-12T00:11:16Z","closed_at":null,"body":"Suppose I have an Accept header that looks like:\r\n```\r\nAccept: application/vnd.api+json; ext=bulk\r\n```\r\nThe output of `new Negotiator(request).mediaType()` would be `application/vnd.api+json` as expected. But when I specify an array of media types:\r\n```js\r\nvar negotiator = new Negotiator(request);\r\nnegotiator.mediaType(['application/vnd.api+json']); // returns `undefined`\r\nnegotiator.mediaType(['application/vnd.api+json; ext=bulk,patch']); // returns `undefined`\r\nnegotiator.mediaType(['application/vnd.api+json; ext=patch,bulk']); // returns `undefined`\r\nnegotiator.mediaType(['application/vnd.api+json; ext=bulk; supported-ext=bulk']); // returns `undefined`\r\nnegotiator.mediaType(['application/vnd.api+json; ext=bulk']); // returns `application/vnd.api+json; ext=bulk`\r\n```\r\nWhich is kind of WTF because it only matches the *exact* parameters and I get the parameters in the media type as well. Is this expected behavior? I can see that it may be useful in extracting parameters but I expect that it should match the media type without the parameters, otherwise permutations of parameters may get huge. Possible dupe of #30."},"comment":{"url":"https://api.github.com/repos/jshttp/negotiator/issues/comments/101079112","html_url":"https://github.com/jshttp/negotiator/issues/35#issuecomment-101079112","issue_url":"https://api.github.com/repos/jshttp/negotiator/issues/35","id":101079112,"user":{"login":"ethanresnick","id":471894,"avatar_url":"https://avatars.githubusercontent.com/u/471894?v=3","gravatar_id":"","url":"https://api.github.com/users/ethanresnick","html_url":"https://github.com/ethanresnick","followers_url":"https://api.github.com/users/ethanresnick/followers","following_url":"https://api.github.com/users/ethanresnick/following{/other_user}","gists_url":"https://api.github.com/users/ethanresnick/gists{/gist_id}","starred_url":"https://api.github.com/users/ethanresnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethanresnick/subscriptions","organizations_url":"https://api.github.com/users/ethanresnick/orgs","repos_url":"https://api.github.com/users/ethanresnick/repos","events_url":"https://api.github.com/users/ethanresnick/events{/privacy}","received_events_url":"https://api.github.com/users/ethanresnick/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T00:11:16Z","updated_at":"2015-05-12T00:11:16Z","body":"Maybe @reschke or @dret have insight into what the correct behavior should be here, as the above interpretation is just my relatively-uninformed exegesis of the spec."}}