Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure S3 to allow omitting the trailing index.html on documentation pages #11897

Closed
huonw opened this issue Jan 29, 2014 · 7 comments
Closed

Comments

@huonw
Copy link
Member

huonw commented Jan 29, 2014

e.g. http://static.rust-lang.org/doc/master/std/index.html could be http://static.rust-lang.org/doc/master/std/ (which currently hits #11896).

@Hoverbear
Copy link
Contributor

Useful links:

PUT ?website HTTP/1.1
Host: www.example.com.s3.amazonaws.com
Content-Length: 481
Date: Thu, 27 Jan 2011 12:00:00 GMT
Authorization: AWS AKIAIOSFODNN7EXAMPLE:acxI7sWO+ugzxhf2AtcqRLgy70B=

<WebsiteConfiguration xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>
  <IndexDocument>
    <Suffix>index.html</Suffix>
  </IndexDocument>
  <ErrorDocument>
    <Key>Error.html</Key>
  </ErrorDocument>

  <RoutingRules>
    <RoutingRule>
    <Condition>
      <KeyPrefixEquals>images/</KeyPrefixEquals>
    </Condition>
    <Redirect>
      <ReplaceKeyWith>errorpage.html</ReplaceKeyWith>
    </Redirect>
    </RoutingRule>
  </RoutingRules>
</WebsiteConfiguration>

@alexcrichton
Copy link
Member

I have configured S3 to do this (at least I think I have).

It doesn't looks like it's doing it yet, so maybe it takes awhile to propagate? I fired off another doc build to see if it needs another upload to fix everything.

@alexcrichton
Copy link
Member

My configuration changes appear to have not done anything.

@Hoverbear
Copy link
Contributor

@alexcrichton They did nothing very well, you should be proud of your nothingness.

@alexcrichton
Copy link
Member

This is fixed now. Yay!

@alexcrichton
Copy link
Member

for example: http://static.rust-lang.org/doc/master/std

@Hoverbear
Copy link
Contributor

Awesome!

fasterthanlime pushed a commit to fasterthanlime/rust that referenced this issue Jul 22, 2022
fix: escape receiver texts in completion

This PR fixes rust-lang#11897 by escaping '\\' and '$' in the text of the receiver position expression. See [here](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax) for the specification of the snippet syntax (especially [this section](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#grammar) discusses escaping).

Although not all occurrences of '\\' and '$' have to be replaced, I chose to replace all as that's simpler and easier to understand. There *are* more clever ways to implement it, but I thought they were premature optimization for the time being (maybe I should put FIXME notes?).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants