Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

trailing slash in web urls

 
Goto page Previous  1, 2
   Soft32 Home -> Linux -> Genreal Discussions RSS
Next:  Need advice on linux distro  
Author Message
... et al.

External


Since: Jul 04, 2003
Posts: 4



(Msg. 16) Posted: Sat Jul 05, 2003 11:17 pm
Post subject: Re: trailing slash in web urls (and in Linux paths?) [Login to view extended thread Info.]
Archived from groups: alt>os>linux (more info?)

Peter T. Breuer <ptb.RemoveThis@oboe.it.uc3m.es> wrote:

> ... et al. <look.RemoveThis@sig.bcause.this.is.invalid> wrote:
> > Joachim Feise <reply.RemoveThis@the.newsgroup> wrote:
>
> >> Simply use URLs correctly, i.e., add a slash if your URL points to
> >> a directory.
>
> > I totally sympathise with the explanation by you and Sybren Stuvel. And
> > the reasoning why slashes (instead of backslashes or colons) is used, is
> > that internet, the HTTProtocol and webbrowsing all where developed on
> > systems running Unix-style OS's, right?
>
> No. Quite the opposite. The slash is so that systems which don't have
> the same kind of file structure know to do a getdents instead of a
> lstat. Remember that URLs have to work on embedded smartcard
> applications too, and there ain't a lot of code available in your
> magnetic stripe.
>

Oops. ¿The opposite?, that's bad. I'll put it in the pile of things to
look up.

> Anyway, unix servers generally translate to the right call for you.
>
> > As a person that want's to understand Linux, this then brings me to be
> > harassed by another question.
>
> > Then, .. in the name of logic .., shouldn't the same rule apply to all
> > paths in Unix (read Linux) as well? As in, for example, "You would
>
> Paths are a question for your shell, not of unix. But yes, there is a
> posix shell, and ...
>
> > usually find foo in /bar/ or somtimes under /bar/subbar/" But i don't
>
> .. this is quite correct usage.

Thanks then, if no one says otherwise, i'll continue doing that way. Smile

> The shell normally translates for you, however.

That sounds awfully analogous to what a web-server does if you point
your browser to a directory and don't provide the trailing slash.

> There are a few occasions when you will get different answers
> from ls foo than ls foo/, but not many. ls -l of a softlink to a
> directory springs to mind.
>

Interesting.

> > I'm afraid the answer might have to do with the "in Unix everything is a
> > file" statement? As in, also directories are files. But even more
> > unlogical then!, there _is one_ directory where the trailing slash
> > actually always _is_ used [1].
>
> I don't understand your problem.

Well, thanks for providing comments and insights anyway. Wink

> You are basing your reasoning on false aprehensions.

Possibly. I was posting so i wouldn't continue to do that, if that is
the case. Show me the errors and i'll gladly ... ¡hey wait! Weren't you
agreeing with that trailing slashes were "quite correct usage" above?

> And even if your hypoteheses were right, so what? The shell is free to
> help you out whenever it feels like.
>

I like to voluntarily write the trailing slashes in linux paths, (and
continue to feel justly saddened by why others don't do the same, )if
that is the "correct" way to do it. Just like i voluntarily write the
trailing slashes in URL paths. I don't want the shell, or web-server, to
have to help me out when i so easily can do it the "correct" way myself.

>
> > [1] That would be the root-directory, the slash-directory, the "/".
>
> No - that would be "//" following your nomenclature.

No, au contraire.
With "my" nomenclature, the name of the root-directory is "" (in
some Unix geekiness style ;-/) and thus the path would be written "/"
like it usually is. The path of the directory named "bar" placed in the
root-directory would then be "/bar/" if written "correctly", but usually
sloppily written as "/bar" by most users, because they get away with it,
because as you say the shell steps in and helps the user out by
"normally translating" for him/her.
Opposite, if slashes were only, in the wording of Joachim's
followup, "a generic separator in a hierarchical tree of collections",
and not to also be used as indicators of "pointing to a directory". and
the root-directory is named "/" it's path again is correctly written as
"/", with no trailing slash. But then the path for the directory named
"bar" there-in ought to be written "//bar", because you have to have a
separator between the directories in the path. And that is not how it
usually is written.

> Indeed, it is, in URLs. Try
>
> lynx file:///
>
> and
>
> lynx file://
>
> and tell me which works as you expect!
>

Yeah, i've seen them triple slashes at times. My brain isn't wired to
parse them though. I understand the two first, i think, but the last
slash always seems one too many to me. Sad
May have something to do with me thinking the root-directory is named ""
and not "/"?
Again, the pile of things to look up, for me to understand, grows...

--
Please followup in newsgroup.
E-mail address is invalid due to spam-control.
Back to top
Login to vote
... et al.

External


Since: Jul 04, 2003
Posts: 4



(Msg. 17) Posted: Sun Jul 06, 2003 1:57 pm
Post subject: Re: trailing slash in web urls (and in Linux paths?) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Lew Pitcher <lpitcher DeleteThis @sympatico.ca> wrote:

> Without hesitation, ... et al. asserted (on or about 07/04/03 13:45) that:
> > Joachim Feise <reply DeleteThis @the.newsgroup> wrote:
> >
> >
> >>Simply use URLs correctly, i.e., add a slash if your URL points to
> >>a directory.
> >
> >
> > I totally sympathise with the explanation by you and Sybren Stuvel. And
> > the reasoning why slashes (instead of backslashes or colons) is used, is
> > that internet, the HTTProtocol and webbrowsing all where developed on
> > systems running Unix-style OS's, right?
>
> Nope.
>
> > As a person that want's to understand Linux, this then brings me to be
> > harassed by another question.
> >
> > Then, .. in the name of logic .., shouldn't the same rule apply to all
> > paths in Unix (read Linux) as well?
>
> Nope.

Thanks for the clarification and insight.
(i hope you catch the sarcasm)

--
Please followup in newsgroup.
E-mail address is invalid due to spam-control.
Back to top
Login to vote
Display posts from previous:   
Related Topics:
acl and linux - hi, i have to work with acl and linux; how is the best file system to do it ? (i have heard reiserfs but i don't know....

Microsoft/LINUX debate. - Why does people brother having this Microsoft/LINUX mud-slinging thing? I am new to LINUX but installed REDHAT 8..

Multiple CD volume backup solution - Hi all I'm looking for a backup package that will allow me to span multiple CDs and also allow for individual CD..

virus scanner - Hi All was wondering if i can get some idea of what people are useing for virus scanners on Redhat 8. Its sendmail tha...

Need advice on linux distro - I Installed Debian Linux on a spare computer 2 months ago, and that was the first time I used linux. I've been using i...

Ymessenger or Gaim no sound. - Im trying to use yahoo messenger (0.99.19) and / or gaim (v0.64) on a RH8 system. I do have sound working on the..
       Soft32 Home -> Linux -> Genreal Discussions All times are: Pacific Time (US & Canada) (change)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]