Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing ContentType is too restrictive #12

Closed
dtabakov opened this issue Jan 18, 2016 · 4 comments · Fixed by #78
Closed

Parsing ContentType is too restrictive #12

dtabakov opened this issue Jan 18, 2016 · 4 comments · Fixed by #78
Labels

Comments

@dtabakov
Copy link

DocumentLoader::LoadDocument() tries to validate that the media type is JSON-LD. However, the check is too strict: it only passes if the content type is equal to "application/ld+json". This excludes other valid strings like "application/ld+json; charset=utf-8". Specifying the charset is very common for users who create their response messages using System.Net.Http.dll (e.g., using StringContent).

An easy fix is to replace equality check with "StartsWith()".

@stale
Copy link

stale bot commented May 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 4, 2020
@stale stale bot closed this as completed Jun 3, 2020
@goofballLogic
Copy link
Member

Reconsidering as part of #60

@goofballLogic goofballLogic reopened this Jul 2, 2020
@stale stale bot removed the stale label Jul 2, 2020
@goofballLogic
Copy link
Member

Should be implemented in conjunction with #21

@stale
Copy link

stale bot commented Oct 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants