url_parse(): better take better care for path parts (Stephen Isard)..
Stephen reported
I have an imap account to which I can connect with mailx but not s-nail.
In the account definition in my .mailrc, I have
account XX {
set folder=imaps://username@servername/Mail
..
Running s-nail with -vv I see that I am logging in successfully with
gssapi, but then
T2 OK Logged in
>>> T3 SELECT "Mail/"
T3 NO [CANNOT] Invalid mailbox name
..
Anyway, mailx is doing the right thing for that imap server, but s-nail
is not.
url_parse() yet doesn't normalize the input (i.e., splits it up
into its components and joins them correctly as requested).
This results in problems when there are adjacent slashes as well
as for single-slash URLs as above.
Poor Stephen had then to stand a somewhat deteriorating I (isn't
that self-contradicted?), but the sentence of mine i liked the
most was
set folder=imaps://user1@localhost/Xmail//////
..
MAILRC=/tmp/xxx.rc ./s-nail -dvvAtmail
..
SELECT "Xmail"
s-nail version v14.8.10. Type ? for help.
"imaps://user1@localhost/Xmail": 0 messages
But
MAILRC=../xxx.rc ./mailx -Atmail -v
..
>>> T3 SELECT "INBOX"
Oooooh!
Heirloom mailx version 12.5 7/5/10. Type ? for help.
"imaps://user1@localhost/INBOX": 0 messages
Buuuuuuuuuuh!
^_^