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

specs: kXR_dirlist doesn't follow specs for empty dirs #739

Closed
sbinet opened this issue Jun 11, 2018 · 4 comments
Closed

specs: kXR_dirlist doesn't follow specs for empty dirs #739

sbinet opened this issue Jun 11, 2018 · 4 comments

Comments

@sbinet
Copy link

sbinet commented Jun 11, 2018

According to the specs of kXR_dirlist:

the normal response to a kXR_dirlist command (with kXR_dstat) is:

Normal Response w/ kXR_dstat
   kXR_char  streamid[2]
   kXR_unt16 0
   kXR_int32 dlen
   kXR_char  “.\n”
   kXR_char  “0 0 0 0\n”
   kXR_char  dirname\n
   kXR_char  statinfo\n
     •
     •
     •
   kXR_char  0

also, it says:

  1. An empty directory will return the eight-byte triplet {streamid, 0, 0}.

I'd assume the note 6) was written when kXR_dirlist is issued w/o kXR_dstat, because when issueing it w/ kXR_dstat I get a dlen != 0 and the following trailing bytes:

.\n0 0 0 0\x00

whereas, at the very least (for consistency's sake), we should get:

.\n0 0 0 0\n\x00
@sbinet
Copy link
Author

sbinet commented Jun 11, 2018

/cc @EgorMatirov

sbinet added a commit to go-hep/hep that referenced this issue Jun 11, 2018
This CL adds a temporary hack for issueing kXR_dirlist requests against
empty directories.
According to the specs, an empty directory should just return the 8-byte
triplet {streamid, 0, 0}.
But when called with kXR_dstat, we don't see this.

Updates xrootd/xrootd#739.
@abh3
Copy link
Member

abh3 commented Jun 21, 2018

I have removed the ambiguities from the kXR_dirlist request description in v4 of the protocol documentation.

@abh3 abh3 closed this as completed Jun 21, 2018
@sbinet
Copy link
Author

sbinet commented Jun 21, 2018

thanks.

FYI, it now reads:

“{streamed,0,8}.\n0 0 0\0”

whereas it should probably be:

“{streamid,0,8}.\n0 0 0\0”

@abh3
Copy link
Member

abh3 commented Jun 21, 2018 via email

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

2 participants