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

Redirect from howsmytls.com to howsmyssl.com returns text/html even on the JSON endpoint #301

Open
Piskvor opened this issue Jan 31, 2020 · 1 comment

Comments

@Piskvor
Copy link

Piskvor commented Jan 31, 2020

The redirect response at https://www.howsmytls.com/a/check returns

HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Location: https://www.howsmyssl.com/a/check

<a href="https://www.howsmyssl.com/a/check">Moved Permanently</a>.

This is always returned, even for requests with Accept: application/json. At this point, this is somewhat academic; but would become common when the domains are switched, and www.howsmytls.com becomes canonical.

Perhaps returning an empty JSON object {} would be useful here, or perhaps populating the Error field:
{ error: "Moved permanently: https://www.howsmyssl.com/a/check" } - the 301 response should be sufficient for a redirect, but if the redirect also returns a body, it probably should be in the expected MIME type.

@jmhodges
Copy link
Owner

jmhodges commented Feb 2, 2020

Oh, a fair idea!

@jmhodges jmhodges changed the title Redirect returns text/html even on the JSON endpoint Redirect from howsmytls.com to howsmyssl.com returns text/html even on the JSON endpoint Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants