[MGNLGQL-100] Modify Servlet to accept all JSON requests Created: 10/Jun/21 Updated: 10/Jun/21 |
|
| Status: | Open |
| Project: | Magnolia GraphQL |
| Component/s: | None |
| Affects Version/s: | 1.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Scot Rhodes | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Description |
|
If a request is made with, for example, the charset defined, the Servlet will reject the request. That is because there is a check of equality rather than a "startsWith" call. I am creating this ticket and will create a pull request with the modification. This issue presented itself when trying to use the IntelliJ JS-GraphQL plugin, which makes a request with: Content-Type [application/json; charset=UTF-8] The resulting message is: java.lang.IllegalArgumentException: Content-Type [application/json; charset=UTF-8] not allowed for POST method. |