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
- Navigate to: http://app.nytimes.com
- The page displays well.
- There is a link to Subscribe Now
- Click on it http://www.nytimes.com/tpsubscribe?EXIT_URI=http%3A%2F%2Fapp.nytimes.com
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 ❤️
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
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
following the redirect it creates a 200 OK HTTP response.
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.
The reason is probably this code:
the first
window.location.protocol != "https:"
is indeedtrue
which meanswindow.location.href = 'https://www.nytimes.com/subscriptions/Multiproduct/lp8HYKU.html?campaignId=67U46'
Here the fun part starts:
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 ❤️