handle NIL namespace delimiters, update docs #36
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We experience the following NAMESPACE command/response on a yahoo.co.jp
test account:
The server greeting is:
The grammar in https://tools.ietf.org/html/rfc2342 says this is legal,
although I'm not seeing any examples or semantics:
Namespace = nil / "(" 1*( "(" string SP (<"> QUOTED_CHAR <"> /
nil) *(Namespace_Response_Extension) ")" ) ")"
I've opted to have the value pass through as null rather than normalizing it.
This is inconsistent with browserbox's current behaviour for LIST/LSUB in this
case (which I submitted the patches for). In those cases we normalize to '/',
which I didn't have a great reason for, but I also didn't know what else to do.
It may make sense to revisit that decision in the future. I've updated the
docs to reflect the current behaviour and that it may change.
In this case it seems like if we're reporting the namespace at all we might as
well report a falsey value so any consuming logic can know that the value is
not to be trusted and should use the delimiter reported by LIST/LSUB. I do
think we want to report the namespace since the root of "" is useful.
For reference, this is what LIST/LSUB looks like for the (freshly created)
account: