Project

General

Profile

HTTP Method Handling by Resource

Added by Christian Meyer about 1 year ago

Hi!

I am currently trying to build a WResource that handles WebDAV traffic, specifically CardDAV.

It seems like the request never gets to my Resource.
It is answered with 501 code.

I did check out the Sources and found a Place where only a Handful of Methods are beeing Checked for (http/RequestHandler.cpp:74), and all other Methods are handled as Not Implemented and therefore give a 501 Response.

I did try to Add the WebDAV Methods, but it does not want to Work.

I can GET my Resource no Problem, but no Method outside the Listed gets anywhere near it.

Is there a Way to Make Wt Accept other Methods and steering those to the Resources?

My goal is to Build a Readonly CardDAV Server where the Contacts are Managed in the App, with a Per User Access Token.

Thanks for your time!
Christian


Replies (1)

RE: HTTP Method Handling by Resource - Added by Matthias Van Ceulebroeck about 1 year ago

Hello Christian,

as you can indeed see, Wt HTTP only supports the HTTP methods (all but CONNECT and TRACE). WebDAV is a superset of HTTP, meaning not all of its methods are found in HTTP.
Wt simply does not support WebDAV.

Extending the RequestHandler to accept the methods specific to WebDAV should work, if all the requests have the same format as regular HTTP requests.
If it doesn't completely adhere to the same standard, you will likely get other errors than 501 Not Implemented. If any of those errors are unclear, please let me know.

Mind that WebDAV uses XML content, so you will have to parse that.

Best,
Matthias

    (1-1/1)