Status Codes for Redirects

33 views
Skip to first unread message

webm...@rideschedules.com

unread,
Jan 10, 2024, 10:34:03 AM1/10/24
to RTD Developers
I see you are returning a 308, which is a permanent redirect, from your published static URLs.  This is a newer code that is not correctly describing the situation and invites misbehavior (yes, it is shocking but true).  With the 308, heuristics behind whether or not to actually follow the redirect change in the various implementations. 

I think what you are intending is to provide a static URL to the latest GTFS or GTFS-R and setup redirects to whatever or where ever the latest data actually happens to be.

The 302 Found better describes that case.

"...This response code means that the URI of requested resource has been changed temporarily. Further changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests."

Please update to 302 so your static URLs can be setup and actually work. 





Mark Stosberg

unread,
Feb 5, 2024, 11:24:18 AM2/5/24
to RTD Developers
I agree. 302 would be a better choice here.

❯ http --no-follow  https://www.rtd-denver.com/files/gtfs/bustang-co-us.zip
HTTP/1.1 308 Permanent Redirect
CF-Cache-Status: MISS
CF-RAY: 850c7f43ce3610f4-ORD
Cache-Control: public, max-age=0, must-revalidate
Connection: keep-alive
Content-Type: text/plain
Date: Mon, 05 Feb 2024 16:23:18 GMT
Location: /api/download?filename=bustang-co-us.zip&feedType=gtfs
Refresh: 0;url=/api/download?filename=bustang-co-us.zip&feedType=gtfs
Server: cloudflare
Strict-Transport-Security: max-age=63072000
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Vercel-Id: cle1::994hd-1707150198413-738dd0b08fe3

Redirecting...

Reply all
Reply to author
Forward
0 new messages