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

[BUG] Web preview changes the content-type header of the response #481

Open
alonstern opened this issue Aug 28, 2024 · 1 comment
Open
Labels
bug Something isn't working Triage-needed Triage needed by Cloud Shell team

Comments

@alonstern
Copy link

To Reproduce

python -m http.server 9000 &
curl -v http://localhost:9000

Configure web preview to port 9000 and click "Open and browse"

Observed Behavior

image
The curl command returns the right content-type text/html.

image
The web preview page returns a content-type of application/json and therefore the page is not rendered correctly.

Expected behavior

I would expect the web preview the web preview to return the same content-type as the service returns such that the browser will render it correctly

Is this specific to Cloud Shell?

Yes, as I showed curl returns the right header.

Interface information

Edge on Mac OS

Additional context

None

This seems like a very basic usage of the web preview feature so I might be missing something. I would appreciate your help in making it work. Thank you.

@alonstern alonstern added bug Something isn't working Triage-needed Triage needed by Cloud Shell team labels Aug 28, 2024
@torenware
Copy link

Tried this on Chrome; Web preview is serving a file that curl says is text/html as application/json, which makes the feature entirely worthless. How can I get Web preview to stop screwing up the mime type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Triage-needed Triage needed by Cloud Shell team
Projects
None yet
Development

No branches or pull requests

2 participants