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
Fails to load webpage with content-type "text/html;" #8506
Comments
I agree with @swernerx here. |
Technically, the header However, it looks like Cypress wouldn't even recognize a valid parameter like cypress/packages/server/lib/server.js Lines 70 to 84 in dd979eb
This section of code should probably be updated to case-insensitively check that the content-type starts with Cypress also tries to check for valid HTML tags as a fallback, I'm not sure why this isn't working for your application, does it present valid HTML? - Edit: I see the issue now, it doesn't consider that unless the content-type tag is missing entirely |
The code for this is done in cypress-io/cypress#9057, but has yet to be released. |
@swernerx FYI I don't know if you need a workaround for your specific case until this fix is available, but using the console or more easily via Microsoft Azure Storage Explorer, you can edit the Content-Type served by azure storage. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
When loading a web page from our CDN (Azure) we do not have any issues in standard web browsers but when using Cypress. We receive the following error message:
Seems like it does the like the appended semicolon. I can't imagine that this additional semicolon used for adding e.g. a charset information is really that problematic.
Desired behavior:
I guess Cypress should tolerate all content-types starting with "text/html" instead of doing a strict string check here.
Test code to reproduce
Try running cypress again one of our CDN urls e.g.:
CYPRESS_BASE_URL=https://hconnectmanage-qa.azureedge.net/ yarn cypress run
The actual test is not relevant. It fails even before starting.
I modified your tiny repo to show it quickly:
https://github.com/swernerx/cypress-test-tiny/tree/content-type-issue
Versions
Cypress: v5.1
MacOS 10.15.6
Electron as bundled by Cypress
The text was updated successfully, but these errors were encountered: