Describe the reason for these changes and the problem that they solve
<script type="text/javascript" ... and Content-Type: application/javascript are both MIME types that are widely read and understood intuitively. It seems like RFC9239 makes an attempt to address a technical/specification inconsistency between the two of them.
In particular, section six of RFC9239 ("IANA Considerations") states:
The media type registrations herein are divided into two major categories: (1) the sole media type "text/javascript", which is now in common usage and (2) all of the media types that are obsolete (i.e., "application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript1.0", "text/javascript1.1", "text/javascript1.2", "text/javascript1.3", "text/javascript1.4", "text/javascript1.5", "text/jscript", "text/livescript", and "text/x-ecmascript").
Briefly summarize the changes
When handling outbound responses from the frontend application, if the Content-Type header matches the application/javascript MIME type, perform a string replacement at the start of the header to replace application/javascript with text/javascript.
How have the changes been tested?
Deployed to an haproxy instance and tested with some example requests to an instance of the frontend application
Describe the reason for these changes and the problem that they solve
<script type="text/javascript" ...
andContent-Type: application/javascript
are both MIME types that are widely read and understood intuitively. It seems like RFC9239 makes an attempt to address a technical/specification inconsistency between the two of them.In particular, section six of RFC9239 ("IANA Considerations") states:
Briefly summarize the changes
frontend
application, if theContent-Type
header matches theapplication/javascript
MIME type, perform a string replacement at the start of the header to replaceapplication/javascript
withtext/javascript
.How have the changes been tested?
haproxy
instance and tested with some example requests to an instance of thefrontend
application