Skip to content

Add doc about trailing slashes#265

Merged
aantron merged 6 commits intocamlworks:masterfrom
rawleyfowler:master
Apr 24, 2023
Merged

Add doc about trailing slashes#265
aantron merged 6 commits intocamlworks:masterfrom
rawleyfowler:master

Conversation

@rawleyfowler
Copy link
Copy Markdown
Contributor

@rawleyfowler rawleyfowler commented Apr 22, 2023

fixes #244

@aantron
Copy link
Copy Markdown
Collaborator

aantron commented Apr 23, 2023

@rawleyfowler Thanks! Could you do a brief search for a better resource on this than the SO thread I linked in #244? Rather than explaining this in Dream's docs, I'd like to briefly mention it in one sentence, and link the interested user to a more extensive discussion somewhere else. Perhaps even one of the HTML RFCs says something directly about this. I'd basically like to warn the user that this difference exists, but let the reasoning be given in detail elsewhere.

@aantron
Copy link
Copy Markdown
Collaborator

aantron commented Apr 23, 2023

BTW we can also merge this PR and open a separate issue in case someone else is able to offer a reference later!

@rawleyfowler
Copy link
Copy Markdown
Contributor Author

@aantron I'll fix it up, sorry it was 2AM when you replied originally :)

@rawleyfowler
Copy link
Copy Markdown
Contributor Author

@aantron Should be good-to-go, RFC 1738 Section 3.3 has us covered!

@aantron
Copy link
Copy Markdown
Collaborator

aantron commented Apr 23, 2023

Thanks. RFC 1738 doesn't seem to really say anything about this issue, neither in section 3.3, nor elsewhere. Section 3.3:

   The HTTP URL scheme is used to designate Internet resources
   accessible using HTTP (HyperText Transfer Protocol).

   The HTTP protocol is specified elsewhere. This specification only
   describes the syntax of HTTP URLs.

   An HTTP URL takes the form:

      http://<host>:<port>/<path>?<searchpart>

   where <host> and <port> are as described in [Section 3.1](https://www.rfc-editor.org/rfc/rfc1738#section-3.1). If :<port>
   is omitted, the port defaults to 80.  No user name or password is
   allowed.  <path> is an HTTP selector, and <searchpart> is a query
   string. The <path> is optional, as is the <searchpart> and its
   preceding "?". If neither <path> nor <searchpart> is present, the "/"
   may also be omitted.

   Within the <path> and <searchpart> components, "/", ";", "?" are
   reserved.  The "/" character may be used within HTTP to designate a
   hierarchical structure.

So far, the closest was I found was RFC 3986 but it's way too arcane to use as a reference in Dream's docs. There is this SO answer that mentions it. The answer above that mentions the difference in a different way, and vaguely mentions how relative links are interpreted differently in the two cases. I don't really see a clear reference on the difference yet that mentions all these things in an understandable way.

I think it's fine to merge without it, I just wanted to see if something like that exists online :)

@rawleyfowler
Copy link
Copy Markdown
Contributor Author

Yeah I looked around, there isn't much. There is a Wikipedia article but I don't know how I feel about linking that, as it doesn't cover a lot either. Maybe we can merge now and at-least have it mentioned then see if something nicer comes around later.

@rawleyfowler
Copy link
Copy Markdown
Contributor Author

How do we feel about linking the issue in the docs?

@aantron
Copy link
Copy Markdown
Collaborator

aantron commented Apr 23, 2023

That might be a good idea. Perhaps the comment I wrote here is (unsurprisingly) what I am looking for as something to link to, sadly no more detailed such thing seems to exist.

@rawleyfowler
Copy link
Copy Markdown
Contributor Author

@aantron Hopefully it's good to go now!

@aantron aantron merged commit 561e99d into camlworks:master Apr 24, 2023
@aantron
Copy link
Copy Markdown
Collaborator

aantron commented Apr 24, 2023

Many thanks!

aantron added a commit that referenced this pull request Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Difference between path and path/ in the router

2 participants