Skip to content

Conversation

@bmd3k
Copy link
Contributor

@bmd3k bmd3k commented Jun 7, 2022

While investigating the test failure that lead to #5746, we realized that RFC 9239 (https://www.rfc-editor.org/rfc/rfc9239) has changed the preferred js mimetype to 'text/javascript' from 'application/javascript'.

To be a good citizen of the internet, this change modifies the logic introduced in #3128 to force the mapping of js files to mimetype 'text/javascript'. We must also modify http_util.py to ensure that the proper charset is included in the Content-Type header. And, finally, we modify the example plugin to use 'text/javascript' as mimetype.

To Test:

  • I ran local tensorboard and used the chrome developer tools to verify that the Content-Type for js files fetched by the browser was 'text/javascript; charset=utf-8'. I did a basic sanity test ensuring both Angular and Polymer portions of the application are running.
  • I ran a tensorboard with the example plugin installed and verified that index.js is returned with Content-Type 'text/javascript'.

@bmd3k bmd3k marked this pull request as ready for review June 8, 2022 13:37
@bmd3k bmd3k requested a review from nfelt June 8, 2022 13:37
Copy link
Contributor

@nfelt nfelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bmd3k bmd3k merged commit 5c22b0c into tensorflow:master Jun 8, 2022
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Mar 27, 2023
…5747)

While investigating the test failure that lead to tensorflow#5746, we realized that RFC 9239 (https://www.rfc-editor.org/rfc/rfc9239) has changed the preferred js mimetype to 'text/javascript' from 'application/javascript'.

To be a good citizen of the internet, this change modifies the logic introduced in tensorflow#3128 to force the mapping of js files to mimetype 'text/javascript'. We must also modify http_util.py to ensure that the proper charset is included in the Content-Type header. And, finally, we modify the example plugin to use 'text/javascript' as mimetype.

To Test:
* I ran local tensorboard and used the chrome developer tools to verify that the Content-Type for js files fetched by the browser was 'text/javascript; charset=utf-8'.  I did a basic sanity test ensuring both Angular and Polymer portions of the application are running.
* I ran a tensorboard with the example plugin installed and verified that index.js is returned with Content-Type 'text/javascript'.
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
…5747)

While investigating the test failure that lead to tensorflow#5746, we realized that RFC 9239 (https://www.rfc-editor.org/rfc/rfc9239) has changed the preferred js mimetype to 'text/javascript' from 'application/javascript'.

To be a good citizen of the internet, this change modifies the logic introduced in tensorflow#3128 to force the mapping of js files to mimetype 'text/javascript'. We must also modify http_util.py to ensure that the proper charset is included in the Content-Type header. And, finally, we modify the example plugin to use 'text/javascript' as mimetype.

To Test:
* I ran local tensorboard and used the chrome developer tools to verify that the Content-Type for js files fetched by the browser was 'text/javascript; charset=utf-8'.  I did a basic sanity test ensuring both Angular and Polymer portions of the application are running.
* I ran a tensorboard with the example plugin installed and verified that index.js is returned with Content-Type 'text/javascript'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants