-
Notifications
You must be signed in to change notification settings - Fork 48
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
Comments
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. |
Reconsidering as part of #60 |
Should be implemented in conjunction with #21 |
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. |
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()".
The text was updated successfully, but these errors were encountered: