-
-
Notifications
You must be signed in to change notification settings - Fork 562
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
Missing content type #350
Comments
Just to clarify, I assume this error only exists for the Sitemap middleware as everything else is standard MVC? |
Well, no. I see no content type in the response of the pages served by cms as well. But i see no side effect so far - but i only checked with my browsers (chrome, firefox, ie and mobile browsers safari and chrome on ios) and i dont know, the default behavior of application which implemented the "nosniff". I checked the manager section and this is fine, the content type is included. Same maybe for the encoding, i saw it in manager, that it is "gzip" there, should be for content management pages as well? |
Well, additional comment. I think you can ignore the cms part. The content type is only missing in case of response type "304". I guess this is fine, i checked with other website and there the content type is also included in "304" case. But as i said, i see no error case. So fixing the sitemap.xml would be enough and great. Sorry for the confusion. Thanks. |
I've checked pages coming from the CMS and they return |
This has now been released and is available in |
It seems piranha is not providing content type in response.
In general maybe no big issue, but if you run the application with the following security header:
<add
name="X-Content-Type-Options" value="nosniff" />The browsers (or other applications) are ask to ignore file extensions or guessing using the content.
What is the result or the problem:
You can see it very easily using the sitemap, the sitemap is displayed in the browser as plaintext, not as xml where you can collapse the nodes etc.
Another application i am using for seo analysis thinks the sitemap is a normal page and gave me the advice to add description, headline etc.
I have no idea what the result is for a crawler or so.
So my request is: Please add the content type header depending on the resource (xml for the sitemap ;) )
I did a quick check, the mvc is working correcty, if i request the response from the controller directly i see the correct content type (for example json)
public IActionResult Details() { return Json(""); }
The text was updated successfully, but these errors were encountered: