arrow-down arrow at-sign bug check checkbox-checked checkbox-unchecked svg-checkmark chevron-right chevrons-right circle-down circle-left circle-right circle-up cloud2 svg-cross2 download download external-link filter github hash home leaf leaf left link-2 log-in log-out mail menu message-square minus plus radio-checked radio-checked2 radio-unchecked search settings spinner8 target twitter up upload-2 user users warning x zap
  • Home
  • Report a bug
  • Contribute
  • All issues
  • Login

URL: http://www.nytimes.com/tpsubscribe?EXIT_URI=http%3A%2F%2Fapp.nytimes.com
Browser / Version: Firefox 52.0
Operating System: Mac OS X 10.12
Problem type: Something else - I'll add details below

Steps to Reproduce

  1. Navigate to: http://app.nytimes.com
  2. The page displays well.
  3. There is a link to Subscribe Now
  4. Click on it http://www.nytimes.com/tpsubscribe?EXIT_URI=http%3A%2F%2Fapp.nytimes.com

Screenshot Description

Expected Behavior: Get a page to subscribe.

Actual Behavior: Falling into an infinite loop of redirections.

The first redirection after clicking on http://www.nytimes.com/tpsubscribe?EXIT_URI=http%3A%2F%2Fapp.nytimes.com

is

HTTP/1.1 301 Moved Permanently
Server: Apache
Location: http://www.nytimes.com/subscriptions/Multiproduct/lp8HYKU.html?campaignId=67U46
Content-Type: text/html; charset=iso-8859-1
X-PageType: legacy
X-Age: 0
X-Origin-Time: 2016-10-05 21:08:21 EDT
Content-Length: 287
Accept-Ranges: bytes, bytes
Date: Thu, 06 Oct 2016 01:08:21 GMT
Connection: close
X-API-Version: F-5-4
Set-Cookie: nyt-a=23478a911b2a914c38e9397fe1502e3fc5e90f3e2b1700ccff46130d8e85bdf0; Expires=Fri, 06 Oct 2017 01:08:21 GMT; Path=/; Domain=.nytimes.com
X-Served-By: cache-hkg6821-HKG
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1475716100.906447,VS0,VE308

following the redirect it creates a 200 OK HTTP response.

HTTP/1.1 200 OK
Server: Apache
Last-Modified: Tue, 04 Oct 2016 16:31:52 GMT
ntCoent-Length: 27899
Content-Type: text/html
Cache-Control: private
Content-Encoding: gzip
X-Origin-Time: 2016-10-05 21:08:21 EDT
Content-Length: 8370
Accept-Ranges: bytes, bytes
Date: Thu, 06 Oct 2016 01:08:21 GMT
Connection: close
X-API-Version: F-4
Set-Cookie: nyt-a=23478a911b2a914c38e9397fe1502e3fc5e90f3e2b1700ccff46130d8e85bdf0; Expires=Fri, 06 Oct 2017 01:08:21 GMT; Path=/; Domain=.nytimes.com
X-Served-By: cache-hkg6821-HKG
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1475716101.361611,VS0,VE158
Vary: Host, Accept-Encoding

So far so good. Some resources start to be loaded.

Then at a point we are redirected again to
https://www.nytimes.com/subscriptions/Multiproduct/lp8HYKU.html?campaignId=67U46

which redirects to itself.

HTTP/1.1 301 Moved Permanently
Server: Varnish
Retry-After: 0
Content-Length: 0
Location: http://www.nytimes.com/subscriptions/Multiproduct/lp8HYKU.html?campaignId=67U46
Accept-Ranges: bytes
Date: Thu, 06 Oct 2016 01:08:21 GMT
Connection: close
X-API-Version: F-0
Set-Cookie: nyt-a=7970b11fbe964ab104d44d750c4bf018691ed63a46578135d3af3dfcbd349db2; Expires=Fri, 06 Oct 2017 01:08:21 GMT; Path=/; Domain=.nytimes.com
X-Served-By: cache-hkg6826-HKG
X-Cache: HIT
X-Cache-Hits: 0

The reason is probably this code:

          if (window.location.protocol != "https:") {
            window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
           }

the first window.location.protocol != "https:" is indeed true which means

window.location.href = 'https://www.nytimes.com/subscriptions/Multiproduct/lp8HYKU.html?campaignId=67U46'

Here the fun part starts:

http GET 'https://www.nytimes.com/subscriptions/Multiproduct/lp8HYKU.html?campaignId=67U46' 'User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Firefox/52.0'
HTTP/1.1 301 Moved Permanently
Accept-Ranges: bytes
Connection: close
Content-Length: 0
Date: Thu, 06 Oct 2016 01:18:47 GMT
Location: http://www.nytimes.com/subscriptions/Multiproduct/lp8HYKU.html?campaignId=67U46
Retry-After: 0
Server: Varnish
Set-Cookie: nyt-a=465360f44d424a0350644c651804522fd29e211f75629d7e52950a6bdfc16d8f; Expires=Fri, 06 Oct 2017 01:18:47 GMT; Path=/; Domain=.nytimes.com
X-API-Version: F-0
X-Cache: HIT
X-Cache-Hits: 0
X-Frame-Options: DENY
X-Served-By: cache-hkg6825-HKG

This is happening in all browsers. I will close it as not a Web Compatibility issue. Still I will notify the New York Times to fix it.

From webcompat.com with ❤️

Please login to edit issues.

View issue on Github

Shortcut: Press l on your keyboard to open the label editor. Shortcut: Press g on your keyboard to be taken to the GitHub view of this page.
Closed: Invalid
#3362

www.nytimes.com - Infinite redirect loop - An undecided "state of mind"

Opened: 2016-10-06
Reporter: karlcow
Comments: 3
  • Home
  • List of issues
  • About
  • Contribute
  • Contact
  • Privacy Policy
  • Terms of Service
  • Code of Conduct