Use text/javascript content type, not application/javascript #516
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use text/javascript content type, not application/javascript
A work in progress pull request to evaluate HTMLUnit 3.11.0 and an attempt to suppress the new HTMLUnit 3.11.0 warnings for uses of the obsolete application/javascript content type.
HtmlUnit/htmlunit#710 raised by @jtnord and fixed in HTMLUnit 3.11.0 reports a warning when it sees the application/javascript content type. Avoid those warnings by using the text/javascript content type.
#515 notes that the application/javascript content type has been declared obsolete and is replaced by the text/javascript content type.
Official docs that confirm application/javascript is obsolete include:
jenkinsci/jenkins-test-harness-htmlunit#140 offers a dependabot upgrade from HTMLUnit 3.10.0 to 3.11.0.
Testing done
Ran automated tests with breakpoints at the changed lines and confirmed that they are not reached by automated tests. Modified one automated test to reach a changed line and confirmed that the test passed, though it did not assert anything about the change of content type. Reverted the automated test modification because it was little value. Will use the incremental build to run tests in Jenkins core.
Submitter checklist