What does the WebDAV index format look like? - webdav

What is the WebDAV format for displaying the directory index?
...I would like to display my own custom index through a WebDAV server.
Therefore I would like to know how I should create the index file so that it can be displayed unser a WebDAV server?
Thanks!
Frank

There is no such thing as a standard index format.
If you want a WebDAV client be able to access your server, you'll have to implement the protocol, as specified in RFC 4918.

Related

Send parameters to IT Hit WebDAV Server

we would like to know if it is possible to send parameters to Webdav server (for example as query string path: http://server:8080/WebDavItHit/Notes.txt?param=value...") using IT Hit WebDAV Server Library for Java + JS Client.
We are looking forward to validate individual users using other application, and sending some parameters could be really useful.
We appreciate any way or alternative for doing this with your library.
Some WebDAV clients, such as MS Office will truncate query string when saving a document. So to pass parameters, you will typically do this in file path, for example:
https://server/[SessionID1234567890]/path/file.ext

Detecting if a URL is a file download

How can I detect if a given URL is a file to be downloaded?
I came across the content-disposition header, however it seems that this isn't a part of http 1.1 directly.
Is there a more standard way to detect if the response for a GET request made to a given URL is actually a file to/can be downloaded?
That is the response is not html or json or anything similar, but something like an image, mp3, pdf file etc.?
HTTP is a transfer protocol - which is a very different thing to hard drive storage layouts. The concept of "file" simply does not exist in HTTP. No more than your computer hard drive contains actual paper-and-cardboard "files" that one would see in an office filing system.
Whatever you may think the HTTP message or URL are saying the response content does not have to come from any computer file, and does not have to be stored in one by the recipient.
The response to any GET message in HTTP can always be "downloaded" by sending another GET request with that same URL (and maybe other headers in the case of HTTP/1.1 variants). That is built into the definition of what a GET message is and has nothing to do with files.
I ended up using the content-type to decide if it's an html file or some other type of file that is on the other end of a given URL.
I'm using the content-disposition header content to detect the original file name if it exists since the header isn't available everywhere.
Could checking for a file extension be a possibility? Sorry I can't enlarge on that much without knowing more, but I guess you could consider using PHP to implement this if HTML doesn't have enough functionality?

Deleting multiplie resources by mask using WEB DAV

Is there any way to delete multiplie resources by mask with web dav protocol out of a box?
For example send some header with condition like regex, for example
'^some.*' - delete all resources starting with 'some'
Maybe somebody had thinking about that?
No, there is no part of the webdav or http11 standards for that. A DELETE is always issued to a single resource identified by the URL

Nginx/Webdav/Put - Content-Range support

I have installed WebDav extensions (--with-http_dav_module,nginx-dav-ext-module) for Nginx, and now I can write, read files using this protocol.
But I need to write data part by part with PUT method, I've found that I can use Content-Range header for this, but I can't find any extension for Nginx to work with Content-Range.
How can I achieve this? Any suggestions?
I can't read data from server and append new data to current and then write it (data is too big).
Using Content-Range for PUT is explicitly forbidden by the HTTP standard, and a really bad idea.
https://www.rfc-editor.org/rfc/rfc7231#section-4.3.4
I wrote a simple specification that allows you to append data:
http://sabre.io/dav/http-patch/
But it does mean that you need to run sabre/dav, and not nginx's webdav module.

POST method WEBDAV not run

I had a server install WEBDAV and I try to do any WEBDAV method
all method like copy, delete, get, lock, mkcol, propfind, propatch run good.
I can create file and store data in server with PUT method. But I don't know how to do it in POST.
when I post anydata to exist file server return data of old file.
And I check in server this file not change any thing
when I try to post new file it return "The requested URL - URL of
file - was not found on this server."
when I try to post new file with out full path, I just send to
folder where I want to store file. I hope server create file with
auto gen Name of file and return name for me. But server return the
resource content in folder ( some thing like index.html )
I want to know how to implement POST method, it can create or repair file on WEBDAV server. any one can help me ?
In general, WebDAV servers do not support POST (more precisely: the WEBDAV specification doesn't mandate any specific behavior for POST, so servers vary in what they do).

Resources