To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.debateOpen lugnet.off-topic.debate in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Debate / 9140
9139  |  9141
Subject: 
Re: Not at all a pact with the devil...
Newsgroups: 
lugnet.off-topic.debate
Date: 
Mon, 29 Jan 2001 20:06:53 GMT
Viewed: 
633 times
  
I think we've been through this before.  The reason that
/foo/bar and /foo/bar/ are almost always synonymous is because
most content (even dynamic) is filesystem based.  That means you
can have either the file "bar" or directory "bar" in directory /foo/
but not both.  Of course LUGNET uses a non-filesystem based
url parser so he can have "bar" and "bar/" under node "/foo/".

One could argue that the url parser should emulate a filesystem
for the following reasons:

1.  The url's use the "/" character, which invokes filesystem style
url parsing in the users mind.  If you are going to invent your own
style of url parsing, why make it masquerade as another type?
2.  "bar" and "bar/" are confusingly similar under any style of parsing.
If they return different content, it should be the intent of the
content creator, not by default.
3.  Most people will omit trailing slashes when typing urls.  This is
not because they are lazy, but because they actually expect the desired
content to be returned.

I really like the use of filesystem URL's for dynamic content.  I'd
love to convert BrickShelf to that style because it's a much more
natural way to access content.  Of course I'll have to code in "bar==bar/"
to not detract from the otherwise positive improvements.  That doesn't
sound too hard.

fixURL(char *buf) {

urlsize=strlen(buf);
if ((buf[urlsize]-1] != '/') && (urlsize < BUFSIZE-1)) {
  buf[urlsize]='/';
  buf[urlsize+1]=0;
}

KL

In lugnet.off-topic.debate, Todd Lehman writes:
In lugnet.off-topic.debate, Tom Stangl writes:
But as Larry has argued before, whether YOU think you are in the right or
not, you are going counterintuitive to the vast majority of the Internet.
There ARE times where you should just get off the high horse and do • something
for the convenience of the majority.

I don't think it's about being "right" or "wrong."  The reason that it's
"counterintuitive" relative to the rest of the Internet is that 99.999999%
of websites don't let you create non-index webpages that don't use filename
extensions.  Naturally in those cases there's no ambiguity between

  http://www.foo.com/bar/bletch
and
  http://www.foo.com/bar/bletch/

because an actual non-index page would have to be written with a filename
extension as (for example)

  http://www.foo.com/bar/bletch.html

But here, there is actually ambiguity between the two because there's no
.html extension for member pages.  Thus, the server *actually doesn't know
and can't tell* which of the two you meant.  It can (and arguably should)
make a guess, but it won't necessarily be correct.

I would have put in autoforwarding a long time ago in cases where /foo/bar
doesn't exist and /foo/bar/ does exist, except that by the time it gets to
the point where it can easily check, it has already output the normal HTTP
headers and thus it's too late to output a 'Location:' header.  But I'll
figure out some trick around this.

--Todd



Message has 1 Reply:
  Re: Not at all a pact with the devil...
 
In lugnet.off-topic.debate, Kevin Loch writes: Of course that should be: fixURL(char *buf) { int urlsize; urlsize=strlen(buf); if ((buf[urlsize]-1] != '/') && (urlsize < BUFSIZE-1)) { buf[urlsize]='/'; buf[urlsize+1]=0; } (...) (24 years ago, 29-Jan-01, to lugnet.off-topic.debate)

Message is in Reply To:
  Re: Not at all a pact with the devil...
 
(...) I don't think it's about being "right" or "wrong." The reason that it's "counterintuitive" relative to the rest of the Internet is that 99.999999% of websites don't let you create non-index webpages that don't use filename extensions. (...) (24 years ago, 27-Jan-01, to lugnet.off-topic.debate)

45 Messages in This Thread:













Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR