Must a server track content type, content length & last-modified date for a folder?

spec/draft-dejong-remotestorage-18.txt at main · remotestorage/spec · GitHub says
"For a folder, the server stores references to nodes contained in the folder, and it should be able to produce a list of them, with for each contained item:

   * item name
   * item type (folder or document)
   * current version
   * content type
   * content length
   * last-modified date"

…but the example listing shows

{
         "@context": "http://remotestorage.io/spec/folder-description",
         "items": {
           "abc": {
             "ETag": "DEADBEEFDEADBEEFDEADBEEF",
             "Content-Type": "image/jpeg",
             "Content-Length": 82352,
             "Last-Modified": "Sat, 2 Jun 2018 15:58:23 GMT"
           },
           "def/": {
             "ETag": "1337ABCD1337ABCD1337ABCD"
           }
         }
       }

If folder nodes are not expected to have content length, content type, nor a last-modified date, the first-quoted sentence should be clarified.

I think you’re right, good catch!
For folder I think only the list of contained items needs to be tracked. ETag can be produced by hashing that info, so no need to track that explicitly.

1 Like