Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Mkdir in the HTTPFileSystem class #69

Open
3 tasks
bbockelm opened this issue Dec 29, 2024 · 2 comments
Open
3 tasks

Implement Mkdir in the HTTPFileSystem class #69

bbockelm opened this issue Dec 29, 2024 · 2 comments
Assignees

Comments

@bbockelm
Copy link
Collaborator

Currently, the Mkdir function in HTTPFileSystem simply returns ENOSYS.

  • Implement this function using the MKCOL WebDAV verb.
  • Add unit test coverage in http_tests.cc for creating a directory.
  • Add coverage for the cases where a directory is created that already exists and for attempting to create a directory that is already a file. We'll need to lookup the WebDAV RFCs to determine the correct HTTP status codes to expect in these cases (it's not a given that XRootD returns the correct ones -- if needed, file an upstream bug).
@bbockelm
Copy link
Collaborator Author

bbockelm commented Jan 2, 2025

Since @alexandertuna is beginning to come online for some of these tasks, I'm re-assigning this to him.

@bbockelm bbockelm assigned alexandertuna and unassigned rw2 Jan 2, 2025
@bbockelm
Copy link
Collaborator Author

bbockelm commented Jan 4, 2025

Some implementation thoughts:

  • Each new HTTP request type is a subclass of the HTTPRequest class; the simplest implementation (which this is probably not far from!) is HTTPHead.
  • A good "checkpoint" would be to call the HTTPRequest directory from a new unit test and look to see (a) if it succeeds with the appropriate status code and (b) if the directory is created on disk.
    • That there aren't any good examples of but you would be doing a lower-level version of TestXfer; if nothing else, that test shows how to do a simple GTest if you're not familiar with GTest.
  • Once there's a HTTP request that can be created, you then want to implement the translation between the XRootD API and the HTTP request object. The method declaration is in HTTPFileSystem.hh and the implementation in HTTPFileSystem.cc. There's not a great example to mimic here because the current Stat actually just opens a file and stats that (probably something worth fixing -- that seems to assume everything is a file!). The HTTPFile::Fstat implementation may be useful.

Here is the RFC definition of the MKCOL verb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants