Recent changes to static.rust-lang.org removed ability to list directory (with updated method)


#1

As part of my playground build environment, I figure out the most recent releases by downloading a file that lists the appropriate date (e.g. https://static.rust-lang.org/dist/channel-rust-nightly-date.txt).

I originally figured this out by following the trail from the downloads page to https://static.rust-lang.org/dist, which I was able to list. During that listing, I found these “date” files which proved to be amazingly useful (thanks!).

Debugging some recent transient errors, I noticed that I am no longer able to list that directory, I just get

<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
  <Key>dist</Key>
  <RequestId>507363BE05560A95</RequestId>
  <HostId>EfORtQ45I9THHjhRC1Fa+fvmq7WvlfM/D7AlJQvHDzmN+XxTpYA7JGUIabCrpjwkL55WKKWqciQ=</HostId>
</Error>

While writing up this post, I just successfully loaded https://static.rust-lang.org/dist/index.html, which seems to be a reasonable alternative. Now that I’ve typed all this up, perhaps this post will be more of a heads-up to others with the same train of thought. :innocent:

Was this a deliberate change, perhaps something for security?


#2

Right now static.rust-lang.org is a CloudFront shim over the static-rust-lang-org S3 bucket. We discovered awhile ago that the configuration meant that although you connected with SSL to static.rust-lang.org it would transmit data from the S3 bucket over HTTP (not HTTPS). In other words, our configuration meant that the traffic you received was still susceptible to MitM (in theory).

In fixing that problem we change the configuration it changed to not work with listing requests (like this) I believe. I think though if you hit the bucket directly it should work? I haven’t tested that out though…


#3

I also ran into this a few months ago.

Just add /index.html to your URL