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

JavaScript files have incorrect Content Type Set #2267

Closed
ghost opened this issue Nov 15, 2019 · 9 comments
Closed

JavaScript files have incorrect Content Type Set #2267

ghost opened this issue Nov 15, 2019 · 9 comments
Assignees
Labels
🪲 bug Issue is not intended behavior ✅ mitigated Has been resolved or has known workaround

Comments

@ghost
Copy link

ghost commented Nov 15, 2019

Storage Explorer Version: 1.11
Build Number: 20191105.2
Platform/OS: Windows 10?
Architecture: x64

Bug Description

After dragging a website to the explore, the Content Type for all Javascript files is text/plain; charset=utf-8 but should be: text/javascript; charset=utf-8

Steps to Reproduce

Drag website with at least one JavaScript file to the explorer.

Expected Experience

All JavaScript files have content type set to text/javascript; charset=utf-8

Actual Experience

All JavaScript files have content type set to text/text; charset=utf-8

Additional Context

this is bad because the uploaded website to Azure $web will not run.

AzureStorageExplorerBug

@JasonYeMSFT
Copy link
Contributor

On Windows, the way we are determining the content type is to look it up in your local registry. If the correct content type for .json files is missing on your machine, you can follow the instructions on this stack overflow post to add it to your local machine:
https://stackoverflow.com/questions/3442607/mime-types-in-the-windows-registry

Once that is done, your future uploads should have the correct content type values. For the existing ones, you need to manually update them.

@AntGK
Copy link

AntGK commented Nov 26, 2019

I am noticing this, only after updating to the recent version (1.11). It used to set content type right automatically before. This broke my websites. Thanks for the information.

@ghost
Copy link
Author

ghost commented Nov 26, 2019

@JasonYeMSFT my registry are correct. As reported by @Ner9 version 1.11 is broken. Can you please fix this?

image

@JasonYeMSFT JasonYeMSFT added the 🪲 bug Issue is not intended behavior label Nov 26, 2019
@JasonYeMSFT
Copy link
Contributor

Thank you for providing the additional info. We will investigate in the issue and see how we can fix it.

@JasonYeMSFT
Copy link
Contributor

@kdawg1406, what content are you seeing for your uploaded .json files? Did you upgraded to 1.11 from the notification we push in the app or did you installed 1.11 from the installer?

@ghost
Copy link
Author

ghost commented Nov 26, 2019

@JasonYeMSFT my bad, thank you for pointing this out. I fixed my .js entry and it seems to be working now.

Question: What application added this .js extension entry into the registry? Obviously text/plain is incorrect. Thank you!

@JasonYeMSFT
Copy link
Contributor

@Ner9, could you please provide the exact file extension and your expected content type that you are seeing regression on?

@AntGK
Copy link

AntGK commented Nov 26, 2019

For me .js files were uploaded as text/plain; Charset=Utf-8. Registry entry for .js had Content Type as text/plain. When I changed to application/javascript as you mentioned, uploaded .js files had the correct content type.

But sites uploaded before I updated to 1.11.1 had correct content type for .js. I am not sure what my Windows registry entry was before the update.

I updated from the notification pushed to the app.

@MRayermannMSFT
Copy link
Member

Older versions of Storage Explorer were using an upload system that did not use the registry to determine content type. AzCopy though, which Storage Explorer now uses, is using the registry to determine content type. That is why y'all have seen a change in behavior.

Anyway, sound like y'all are unblocked. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Issue is not intended behavior ✅ mitigated Has been resolved or has known workaround
Projects
None yet
Development

No branches or pull requests

3 participants