You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/11/29 13:17:47 UTC

[Bug 62964] New: Add RFC7807 conformant Problem Details for HTTP status codes for Webdav Servlets

https://bz.apache.org/bugzilla/show_bug.cgi?id=62964

            Bug ID: 62964
           Summary: Add RFC7807 conformant Problem Details for HTTP status
                    codes for Webdav Servlets
           Product: Tomcat 9
           Version: 9.0.x
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Servlet
          Assignee: dev@tomcat.apache.org
          Reporter: moydevitry@privasphere.com
  Target Milestone: -----

As bug 60362 comment 75 explains, the "reason" together with the http status
code has been replaced with a new standard:

In the case of non-specific HTTP status codes, information about specific 4xx
codes should be included for the API client. These specifications should
returned in an HTTP response in the form of a JSON problem details object as
per [RFC7807] (https://tools.ietf.org/html/rfc7807). It would be useful to make
these specific modifications in WebdavServlet.java available as a show-case.

Or are there better places for this or already finished samples for Tomcat 7?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62964] Add RFC7807 conformant Problem Details for HTTP status codes for Webdav Servlets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62964

--- Comment #2 from Sarah Moy de Vitry <mo...@privasphere.com> ---
(In reply to Mark Thomas from comment #1)
> How are RFC 7807 error messages meant to be provided to WebDAV clients since
> the WebDAV spec predates RFC 7807 and RFC 7807 provides no guidance on this.
We can include the error messages in the same format but as xml content. Since
the Versioning Extension of Webdav allows additional information to be included
in the  body of an error in xml
format(https://www.greenbytes.de/tech/webdav/rfc4918.html#RFC3253) this could
be a viable possibility. 
Also, since the WebDAV protocol inherits many properties from HTTP(which has
deprecated the practice of including reasons in headers and moved towards
including details in the error body) we assumed that Webdav will follow this
trend and update accordingly. 

> Which WebDAV clients support RFC 7807 error messages?
We are currently in contact with a few WebDAV clients who have expressed
interest in supporting RFC 7807 error messages.


> How will a client that hasn't adopted RFC 7807 behave in the presence of an
> RFC 7807 error message?
Clients that haven't adopted RFC 7807 should still be able to take decidable
action based on the original status code alone with the additional information
being superfluous to them. 

Another possibility is to have specific xml errors returned when certain
preconditions and postconditions are violated as per [RFC4918]
(https://www.greenbytes.de/tech/webdav/rfc4918.html#precondition.postcondition.xml.elements)
which is specific to WebDAV.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62964] Add RFC7807 conformant Problem Details for HTTP status codes for Webdav Servlets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62964

--- Comment #3 from Christopher Schultz <ch...@christopherschultz.net> ---
The WebDAV servlet is fairly isolated from everything else in Tomcat.

Patches are always welcome.

Anything you add to the existing responses should be opt-in based upon
configuration of the WebDAV servlet in a particular web application.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62964] Add RFC7807 conformant Problem Details for HTTP status codes for Webdav Servlets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62964

Ralf Hauser <ha...@acm.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hauser@acm.org

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62964] Add RFC7807 conformant Problem Details for HTTP status codes for Webdav Servlets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62964

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #4 from Christopher Schultz <ch...@christopherschultz.net> ---
I've looked at the RFC and it's not great. It basically says "you must repeat
the HTTP response code in the 'status' field", everything else is optional, and
any endpoint can make-up its own URIs for the "error type".

So the "status" doesn't add anything, and every other field has no meaning
unless the client and server agree on the URIs for the "type".

If WebDAV has defined specific "type" URIs then I think this is a plausible
feature for implementation. Until then, it's just individual developers making
stuff up in the hopes that clients choose that particular implementation.

Building against non-standards gets everyone into trouble.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62964] Add RFC7807 conformant Problem Details for HTTP status codes for Webdav Servlets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62964

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
How are RFC 7807 error messages meant to be provided to WebDAV clients since
the WebDAV spec predates RFC 7807 and RFC 7807 provides no guidance on this.

Which WebDAV clients support RFC 7807 error messages?

How will a client that hasn't adopted RFC 7807 behave in the presence of an RFC
7807 error message?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org