David
Mon Mar 14 12:40:50 CST 2005
> That means that every time you request a URL without specifying a file
> name (but with a trailing slash), you get a 302 redirect ??? Sounds
> pretty weird to me ...
No, you misunderstand what I said. Let me clarify.
It doesn't matter if it looks weird to you -- I see nothing in any formal
specification stating what you are expecting, and as long as the web server
is consistent with applying RFC2616, there is nothing wrong. Unless
fr.yahoo.com is running IIS, you cannot apply my statement to it.
What IIS chooses to do is to:
1. If the URL does not have a trailing slash, do courtesy-302-redirect logic
if applicable
2. If the URL has a trailing slash, try the default doc action (either serve
the default doc or dir browse, depending on what is enabled, with dir
browsing preceding default doc)
This is completely consistent with what you see at: fr.yahoo.com .
In other words:
http://www.foo.com results in GET / HTTP/1.1 -- #2 applies
http://www.foo.com/bar results in GET /bar HTTP/1.1 -- #1 applies if "bar"
is not a file
If you say that it works for other website on this server but not this one,
then you either have some IIS configuration that does this (I can't think of
anything immediately), or you have some ISAPI Filter/Extension that is
altering server behavior. Do you happen to *-scriptmap ASP.Net or run some
ISAPI Filter forwarder on the URL namespace?
Try to create a completely new website/host-name and see if it continues to
persist.
--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Christian" <cgregoir99@yahoo.com> wrote in message
news:d13l9t$nep$1@reader1.imaginet.fr...
"David Wang [Msft]" <someone@online.microsoft.com> a écrit dans le message
de news:%239x4kwEKFHA.1528@TK2MSFTNGP09.phx.gbl...
> By-design. Nothing is wrong here, and after the courtesy redirect, the
> browser should see the 200. This is just how it works -- when you start
> looking at HTTP traffic, it is when you realize that a single action in
the
> browser may easily involve >1 request/response that you were simply
unaware
> of. This is just one such behavior during redirection; you will find
others
> in authentication, partion content, etc.
>
> What actually happens is:
> 1.
http://www.foo.com -- gets a courtesy 302 redirect from IIS to the
> default document named /Default.aspx (that's what the location header
tells
> the client).
> 2.
http://www.foo.com/Default.aspx -- IIS returns the specified document
Thanks for the reply David.
That means that every time you request a URL without specifying a file name
(but with a trailing slash), you get a 302 redirect ??? Sounds pretty weird
to me ...
Look at the request below :
C:> telnet fr.yahoo.com 80
Trying 217.12.3.11...
Connected to fr.yahoo.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: fr.yahoo.com
HTTP/1.1 200 OK
....
Following your statement, shouldn't I get something like that ? :
HTTP/1.1 302 Found
Location: /default.htm
....
What irks me is that the other web sites set up on that same IIS system
don't behave that way. They do have a list of default documents but
requesting, say, www.mysite.com, leads to a 200 OK reply for all of them.
And there's no redirect configured for that host, actually for any of them.
There must be some misconfiguration don't you think ?