Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Update MediaTypeHeaderValue.IsSubsetOf() to perform consistent checks #438

Closed
wants to merge 1 commit into from

Conversation

dougbu
Copy link
Contributor

@dougbu dougbu commented Oct 13, 2015

nits:

  • add doc comments
  • spelling
  • correct typo in a project.json file

- aspnet/Mvc#3138 part 1/2
  - check parameters with same polarity as type and subtype
    - ignore quality factors
  - bug was obscured because MVC has no formatters supporting wildcard media types

nits:
- add doc comments
- spelling
- correct typo in a `project.json` file
@dougbu
Copy link
Contributor Author

dougbu commented Oct 13, 2015

/cc @Tratcher @loudej @Eilon @rynowak

if (Parameters != null)
// "text/plain; charset=utf-8; level=1" is a subset of "text/plain; charset=utf-8". In turn
// "text/plain; charset=utf-8" is a subset of "text/plain".
if (otherMediaType._parameters != null && otherMediaType.Parameters.Count != 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird to mix fields and properties here. Pick one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 will use the field because first reference to the property will allocate.

@Tratcher
Copy link
Member

:shipit:

@dougbu dougbu closed this Oct 14, 2015
@dougbu dougbu deleted the dougbu/match.contenttype.3138 branch October 14, 2015 19:08
@dougbu
Copy link
Contributor Author

dougbu commented Oct 14, 2015

0581bcf

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants