Mailing List Archive

more content-neg problems
I have DirectoryIndex set to "index".

If I do a directory request with an Accept: line which only lists file
types for which there are no acceptible "index" variants, then apache
builds a directory index and labels it text/html even though an
"index.html" exists.

I.e., try

telnet bong.com 80
GET / HTTP/1.0
Accept: x-world/x-vrml

In general, shouldn't requests for which no acceptible representation
exist return a "406 None Acceptible"?

Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/
Re: more content-neg problems [ In reply to ]
Date: Fri, 16 Jun 1995 16:06:10 -0700 (PDT)
From: Brian Behlendorf <brian@organic.com>

I have DirectoryIndex set to "index".

If I do a directory request with an Accept: line which only lists file
types for which there are no acceptible "index" variants, then apache
builds a directory index and labels it text/html even though an
"index.html" exists.

Oh, crud. What's going on here is that due to confusion on my part,
the directory-scanning code doesn't know whether it got a Not Found or
a No Such Variant, so it assumes the former. I was going to clean
this up about when I did 406's right (which won't happen until there's
a spec); is it more urgent than that?

In general, shouldn't requests for which no acceptible representation
exist return a "406 None Acceptible"?

If the server is choosing among multiple variants, then it clearly
should, but whether there are multiple variants (and if so, how
they're found) is another matter.

rst
Re: more content-neg problems [ In reply to ]
On Sun, 18 Jun 1995, Robert S. Thau wrote:
> Oh, crud. What's going on here is that due to confusion on my part,
> the directory-scanning code doesn't know whether it got a Not Found or
> a No Such Variant, so it assumes the former. I was going to clean
> this up about when I did 406's right (which won't happen until there's
> a spec); is it more urgent than that?

No, not really urgent, but it does mean that people who think they are
protected from DirectoryIndexes by putting an index.html in a directory
aren't really protected.

> In general, shouldn't requests for which no acceptible representation
> exist return a "406 None Acceptible"?
>
> If the server is choosing among multiple variants, then it clearly
> should, but whether there are multiple variants (and if so, how
> they're found) is another matter.

So with Multiviews and such turned off, then a 406 will never be returned
(and a request for "index" when only "index.html" exists will return a
404). Also, if the client has a "*/*" in its Accept: line, then a 406
will also never be returned.

Yeah, the spec is kinda fuzzy on this. We'll wait until Roy is settled
in at the W3O offices for the summer before pursuing this further I guess :)

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/