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

Reader: incorrect header response codes for links missing a protocol such as http:// #349

Closed
designsimply opened this issue Nov 20, 2015 · 2 comments
Labels
[Feature] Reader The reader site on Calypso. [Pri] Low Address when resources are available. [Status] Stale [Type] Bug

Comments

@designsimply
Copy link
Contributor

Steps to reproduce:

  1. Publish a new post with a bad link, i.e. just "www.example.com" with no protocol included
  2. Follow the blog and find the post in the Reader main stream
  3. Click on the link
  4. Check the response header for a call to the bad link
  5. Repeat the last two steps for the blog stream, list stream, tag stream, and single-post view

Sample bad link:

<a href="www.example.com">Example</a>

Result: the link in the main stream correctly returns a 404 response, but the response returned from other pages such as blog stream, list stream, tag stream, and single-post view do not return a 404 for bad links. Also, the error pages in the browser are inconsistent each with a different layout and/or a different Drake.

Here are screenshots and the respective response headers:

From the Reader main stream:

screen shot 2015-07-12 at sun jul 12 9 48 31 pm
Seen at https://wordpress.com/www.example.com using Chrome 43.0.2357.132 on Mac OS X 10.10.4 logged in as designsimply (superadmin) proxied.

↪ curl -I https://wordpress.com/www.example.com
HTTP/1.1 404 Not Found
Server: nginx
Date: Mon, 13 Jul 2015 01:35:56 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
Vary: Cookie
X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
X-Frame-Options: SAMEORIGIN
X-Pingback: https://wordpress.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=60
Pragma: no-cache
X-ac: 1.ord _dca

From the blog feed:

screen shot 2015-07-12 at sun jul 12 9 49 04 pm
Seen at https://wordpress.com/read/blog/feed/www.example.com using Chrome 43.0.2357.132 on Mac OS X 10.10.4

↪ curl -I https://wordpress.com/read/blog/feed/www.example.com
HTTP/1.1 302 Found
Server: nginx
Date: Mon, 13 Jul 2015 01:36:19 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Cookie
X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
X-Frame-Options: SAMEORIGIN
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Location: https://wordpress.com/wp-login.php?redirect_to=https%3A%2F%2Fwordpress.com%2Fread%2Fblog%2Ffeed%2Fwww.example.com&reauth=1
X-ac: 1.ord _dca

From the list stream:

screen shot 2015-07-12 at sun jul 12 9 49 31 pm
Seen at https://wordpress.com/read/list/designsimply/www.example.com using Chrome 43.0.2357.132 on Mac OS X 10.10.4

↪ curl -I https://wordpress.com/read/list/designsimply/www.example.com
HTTP/1.1 302 Found
Server: nginx
Date: Mon, 13 Jul 2015 01:36:38 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Cookie
X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
X-Frame-Options: SAMEORIGIN
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Location: https://wordpress.com/wp-login.php?redirect_to=https%3A%2F%2Fwordpress.com%2Fread%2Flist%2Fdesignsimply%2Fwww.example.com&reauth=1
X-ac: 1.ord _dca

From the tag stream:

screen shot 2015-07-12 at sun jul 12 9 50 19 pm
Seen at https://wordpress.com/tag/www.example.com using Chrome 43.0.2357.132 on Mac OS X 10.10.4

↪ curl -I https://wordpress.com/tag/www.example.com
HTTP/1.1 302 Found
Server: nginx
Date: Mon, 13 Jul 2015 01:36:50 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Cookie
X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
X-Frame-Options: SAMEORIGIN
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Location: https://wordpress.com/wp-login.php?redirect_to=https%3A%2F%2Fwordpress.com%2Fread%2Flist%2Fdesignsimply%2Fwww.example.com&reauth=1
X-ac: 1.ord _dca

From the single-post view:

screen shot 2015-07-12 at sun jul 12 9 50 49 pm
Seen at https://wordpress.com/read/post/feed/36161285/www.example.com using Chrome 43.0.2357.132 on Mac OS X 10.10.4

↪ curl -I https://wordpress.com/read/post/feed/36161285/www.example.com
HTTP/1.1 302 Found
Server: nginx
Date: Mon, 13 Jul 2015 01:37:10 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Cookie
X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
X-Frame-Options: SAMEORIGIN
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Location: https://wordpress.com/wp-login.php?redirect_to=https%3A%2F%2Fwordpress.com%2Fread%2Fpost%2Ffeed%2F36161285%2Fwww.example.com&reauth=1
X-ac: 1.ord _dca

Moved from 6930-wpcom

@designsimply designsimply added [Type] Bug [Pri] Low Address when resources are available. [Feature] Reader The reader site on Calypso. labels Nov 20, 2015
@blowery
Copy link
Contributor

blowery commented Nov 20, 2015

I think all the 302s are correct, if non-ideal, as we require a login to view those pages.

This does expose that lists and the full post view are dealing with missing things badly and we should definitely fix that.

@blowery blowery modified the milestone: Reader: Bug Backlog Dec 1, 2015
@stale
Copy link

stale bot commented Jan 12, 2018

This issue has been marked as stale because it hasn't been updated in a while. It will be closed in a week. If you would like it to remain open, can you please comment below and see what you can do to get things moving with this issue? Thanks! 🙏

@stale stale bot added the [Status] Stale label Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Reader The reader site on Calypso. [Pri] Low Address when resources are available. [Status] Stale [Type] Bug
Projects
None yet
Development

No branches or pull requests

2 participants