简体   繁体   中英

HTTP PUT for new file creation and directory creation

How would a HTTP Server differentiate whether the request in PUT is for a folder creation or a file creation in a directory.

For HTTP GET what I understood is, if the URL has a trailing /, then HTTP Server looks out for a folder with that name and, if does not exist can look out for a file.

How does this work for PUT for a new file and folder creation?

HTTP (the protocol) doesn't have any concept of files or folders. URIs are opaque, except when a relative URI reference is resolved against a base URI.

If you want your server to provide file/folder services, you may want to look into WebDAV (RFC 4918).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM