Yahoo 'Via' header redirect loop

At work we run proxies for filtering malicious traffic and restricting access to unsavoury content - be it pornography or other things outside policy. For a while now we have had an issue where certain Yahoo-run systems will send continual 301 redirects until the browser gives up with an error.

It’s been really annoying to troubleshoot, as it wasn’t quite clear what would trigger it. The normal things like SSL inspection or broken cookies weren’t the cause, and it didn’t seem to be routing or anything else like that. The main time we had seen it was when a user with an iPad tried to access the Yahoo weather app and it wouldn’t work.

Recently a user reported issues with Flickr, another site with the same parent company, same error and no suitable work-around. Time to hit the tools and find a permanent fix!

Not working:

* Rebuilt URL to: https://www.flickr.com/
> GET / HTTP/1.1
> User-Agent: curl/7.35.0
> Host: www.flickr.com
> Accept: */*
> Via: test
< HTTP/1.1 301 Moved Permanently
< X-Instance: flickr.v1.production.manhattan.bf1.yahoo.com
< Location: https://www.flickr.com/
< Content-Type: text/plain; charset=utf-8
< Content-Length: 57
< Server: ATS
< Via: http/1.1 fts110.flickr.bf1.yahoo.com (ApacheTrafficServer [cMs f ]), https/1.1 e2.ycpi.aue.yahoo.com (ApacheTrafficServer [cMs f ])

Working:

* Rebuilt URL to: https://www.flickr.com/
> GET / HTTP/1.1
> User-Agent: curl/7.35.0
> Host: www.flickr.com
> Accept: */*
< HTTP/1.1 200 OK
< X-Instance: flickr.v1.production.manhattan.bf1.yahoo.com
< X-Powered-By: Express
< Content-Type: text/html; charset=utf-8
< Content-Length: 201702
< Server: ATS
< Via: http/1.1 fts108.flickr.bf1.yahoo.com (ApacheTrafficServer [cMsSf ]), https/1.1 e7.ycpi.aue.yahoo.com (ApacheTrafficServer [cMsSf ])
< Connection: keep-alive
{data continues here}

Turns out, if you send a “Via” header you get a 301 redirect to the same URL, possibly because of some weird issue in their back end infrastructure?

Wonders will never cease.



#work