[FIX] Funny message at top of Swiki page

Lex Spoon lex at cc.gatech.edu
Sat Jul 3 23:28:30 UTC 1999


This can actually be quietly fixed on the server, too, which is what a lot of web servers seem to be doing anyway.  (I guess the existence of such forgiving servers is why netscape and whatever other browsers can get away with this.)  What these servers do, is send a redirect if you ask for a URL with the wrong slash-endiness.

A patch has gone around for this a couple of times.  I think all it involves is adding the following to the top of SwikiAction's #process: method:


	(request url last = $/) ifTrue: [
		request reply: (PWS redirectTo: (request url copyFrom: 1 to: (request url size - 1))).
		^self ].


Maybe we should do this on the Squeak swiki?  Unfortunately I can't conveniently test this right now, but it seems pretty simple.



Lex


Mark Guzdial <guzdial at cc.gatech.edu> wrote:
> If you visit http://minnow.cc.gatech.edu/squeak instead of
> http://minnow.cc.gatech.edu/squeak.1, some browsers will think that you're
> visiting a directory and will stick a slash at the end of your URL, e.g.,
> http://minnow.cc.gatech.edu/squeak/  Now, no relative links work right,
> e.g., references to squeak.23 become
> http://minnow.cc.gatech.edu/squeak/squeak.23.
> 
> We currently catch it as a special case, and warn the user.
> 
> Mark
> 
> >When hitting the Swiki, I got the following message at the top of a page:
> >
> >Your original url has a slash after it. Please remove it.
> >HTTP/1.0 200 OK Content-Type: text/html
> >
> >...there didn't appear to be any slash following the URL and I got to the
> >page (the screen shots page) by following a link from the front page.
> >
> >Anyone know why this is happening?
> >
> >- Stephen
> 
> 
> --------------------------
> Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
> (404) 894-5618 : Fax (404) 894-0673 : guzdial at cc.gatech.edu
> http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html





More information about the Squeak-dev mailing list