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

Use text/javascript content type, not application/javascript #516

Closed

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Feb 17, 2024

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.

  • Use text/javascript content type
  • Test with HTMLUnit 3.11.0 (use an incremental build)

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

Preview Give feedback

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.

jenkinsci#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:

* https://datatracker.ietf.org/doc/rfc9239/
* https://www.iana.org/assignments/media-types/application/javascript

jenkinsci/jenkins-test-harness-htmlunit#140
offers a dependabot upgrade from HTMLUnit 3.10.0 to 3.11.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants