question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to load webpage with content-type "text/html;"

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cypress-bot[bot]commented, Nov 2, 2020

The code for this is done in cypress-io/cypress#9057, but has yet to be released. We’ll update this issue and reference the changelog when it’s released.

0reactions
cypress-bot[bot]commented, Nov 9, 2020

Released in 5.6.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v5.6.0, please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix Invalid Content-Type Text HTML - Sitechecker
When coding a website, you can't ignore problems. If you see this error, it means that the linked text, image, audio, video, font,...
Read more >
Blocked because of a disallowed MIME type (“text/html”)
I encountered this b/c my browser was trying to get a non-existent js file due to some cache issue. A simple CTRL+SHIFT+R fixed...
Read more >
Using XMLHttpRequest - Web APIs | MDN
In this guide, we'll take a look at how to use XMLHttpRequest to issue HTTP requests in order to exchange data between the...
Read more >
'text/html:Charset=utf-8', but it should be 'text.xml'. Request ...
This error occurs because the URL configured for MicroStrategy Web Services is incorrect. The URL may have been entered during MicroStrategy ...
Read more >
How To Fix the HTTP 415 Error on Your Website - Kinsta
Website errors can stifle your progress, but can also be simple to fix. ... Content-Type: text/html; charset=UTF-8 Content-Type: image/jpeg;.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found