Subject: RE: WebDAV and 404-handling

From: "Clemm, Geoff" <[email-masked]>
Date: Thu, 16 Jan 2003 13:11:42 -0500

Currently, there is no standard WebDAV content for a 404
body, so you can replace that body without violating
the WebDAV standard.  Probably the safest thing to do is to
only substitute the error page if the 404-body is
empty.

I do see a tension here between what the server would
want to do for a "dumb" client (that just knows how to
render html, and does nothing interesting with status
codes) and what it would do for a "smart" client.  I
personally agree with Julian and Lisa that in these cases,
the needs of the smart client should take precedence, and
the correct error code (404) should be returned.  

Cheers,
Geoff

-----Original Message-----
From: Eriksson, Michael [mailto:[email-masked]]
Sent: Thursday, January 16, 2003 12:55 PM
To: [email-masked]
Subject: FW: WebDAV and 404-handling

Accidentally dropped the list from response.

> -----Original Message-----
> From: Eriksson, Michael 
> Sent: Thursday, January 16, 2003 6:46 PM
> To: 'Julian Reschke'
> Subject: RE: WebDAV and 404-handling
> 
> 
> Julian,
> 
> > Michael,
> > 
> > I think the assumption that there's a difference between 
> "user-oriented
> > (HTML through HTTP)" and "software-oriented (WebDAV)" 
> output is wrong in the
> > first place.
> 
> You are absolutely right. This is also not my assumption,
> but an assumption that is most often present in a "normal"
> HTML/HTTP context.  The error page mechanism, in combination
> with an error page that has a nice message like:
> 
> Oops, we screwed up.
> Please contact us per email at ........
> 
> also adhers to this assumption.
> 
> > 
> > GET on a non-mapped URL should *always* return a 404 status 
> (no matter what
> > the "type" of the user agent is).
> 
> I tend to agree (if we take "non-mapped URL" to exclude e.g.
> permanently moved items) and I will have to check if we
> should generally change our error pages to pass the status
> on.
> 
> However, the correct behaviour of the error page mechanism
> is (judging from the answers to several bug reports that I
> have seen in the tomcat archives) _not_ to pass the status
> on.  The individual error pages can (should?) then set the
> status as appropriate.  Thus your statement is probably
> compatible with the fact that the error pages mechanism
> changes the original status.
> If you see a problem here, e.g. that status codes (or 404s)
> should never ever be changed, you might want to discuss it
> with the tomcat people (s. jakarta.apache.org/tomcat) or in
> the extension with the servlet specification people.
> 
> >And it's perfectly legal to return a response body for a 404.
> 
> It is. However, if WebDAV sends one body and the error page
> overwrites it then the "wrong" contents reach the
> WebDAV-client.  This is exactly the problem that provoked my
> questions.  I.e does WebDAV ever use 404-bodies for
> "important" data?  (Defining "important" as something that
> has a non-neglectable impact on the client behaviour.)
> 
> Michael
>

---

From: "Julian Reschke" <[email-masked]>
Date: Thu, 16 Jan 2003 23:18:08 +0100

> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Clemm, Geoff
> Sent: Thursday, January 16, 2003 7:12 PM
> To: [email-masked]

I don't understand this statement.

If  the resource was not found, return HTTP status 404. If you want to send
descriptive text, do so, but do *not* change the status code. That would be
a bug, and I really don't understand what it's good for.

Julian

--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760