Closed Bug 91292 Opened 23 years ago Closed 22 years ago

Support directory retrieval in ".tar, .gz, .Z" formats

Categories

(Core Graveyard :: Networking: FTP, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: robbe, Assigned: dougt)

References

()

Details

(Keywords: helpwanted)

Attachments

(1 file)

Many FTP servers will give you a whole directory tree bundled up in a nice
archive when you RETR the directory with an appended ".tar.gz" or similar.

CTAN relies heavily on this, so on the $URL you can e.g. see a link to 
  ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/bosisi.tar.gz
This file does not exist on ftp.dante.de, but is generated on the fly from the
bosisi directory.

With 0.9.1, when I click on the ftp link, mozilla will tell me that the file
does not exist. The communication:

[...]
-> SIZE /tex-archive/macr/tex-archive/macros/latex/contrib/supported/bosisi.tar.gz
<- 550 /tex-archive/macros/latex/contrib/supported/bosisi.tar.gz: not a plain file.
-> CWD /tex-archive/macr/tex-archive/macros/latex/contrib/supported/bosisi.tar.gz
<- 550 /tex-archive/macros/latex/contrib/supported/bosisi.tar.gz: No such file
or directory.

Obviously not everything where SIZE fails can not be RETRieved.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Agreed.  Feel like submitting a patch? ;-)
Keywords: helpwanted
Hmmm.... have seen this feature on some ftp servers
However, is this mozilla's fault?
If the server says "just request the directory with an added .tar.gz" and you
do, the server should "understand that"
What could mozilla do to cause the server to not understand this request?
> However, is this mozilla's fault?

Mozilla assumes that because a ftp resource does not have definite size, it must
be a directory, or something that cannot be retrieved at all. That's obviously
wrong for this case, and could be wrong for others. I don't see anything in the
RFC that nurtures this assumption (in fact, I can't find SIZE at all in rfc959).

> Feel like submitting a patch? ;-)

Sure. See next posting.
Attached patch patch that WFMSplinter Review
wow. thank you for the patch.  I will see that it gets in soon.

Gagan, please r= so that I can sr and check this in to the trunk.
Status: NEW → ASSIGNED
if (mResponseCode == 550) // File unavailable (e.g., file not found, no access).
-        return FTP_S_CWD;
+        return FTP_S_RETR;

is that really safe? what happens when a file is REALLY not there and the server
does not support tar.gz compressing?
these were my concerns too. Can we get bbaetz to help verify this? 
if retr fails, then asks to CWD...  
It would be cool to get this "feature" as ns4 does not have it, i dont know
about IE, but i think it does not
We could make a test trunk to get this in and let robbe test it :)
got it. r=gagan
wait a second....

what happens if you want to view the site normally, and the server supports this
tar/gz format?!
Well, you are only supposed to "trigger" this "special feature" when manually
typing the filename with the added tar.gz
ah!  I was worrying about this over the weekend but now I understand.  The file
does not exist until you request it.  np.
Ok
Who is doing the sr and checking?
This seems safe
sr=me.  

Checking in nsFtpConnectionThread.cpp;
/cvsroot/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp,v  <-- 
nsFtpConnectionThread.cpp
new revision: 1.181; previous revision: 1.180
done
fix in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Do servers that support this on-the fly compression provide any identification
in their sessions?

If so, we might want to offer a "get this directory" change to the UI, maybe a
button or extra link...

-helpwanted b/c doug coded this.
Keywords: helpwanted
that would be a cool feature - can you file a seperate bug?
As far as i know servers only make comments about this feature in their welcome
messages so i dont think a UI option for this would be recommended, because
mozilla would have no way to know when the server supports it or not
Hmm... Unless you would like to store the entire welcome message to a temp space
on memory or disk and look for the string "this server supports .tar.gz
requests" or whatever the server message is.
But before that happens, how about fixing bug 90695 ?
Mozilla does NOT show welcome messages in ftp sites... We can't allow that!
I am increasing severity in bug 90695 to normal...
Summary: can't use "give me this directory as a tar/zip archive" feature → Support directory retrieval in ".tar, .gz, .Z" formats
I've also seen servers that return some information in the error message when
you try
  RETR /some/directory
to the effect that "RETR /some/directory.tar" or similar will work.

But since this is not standardized in any way, I don't think we could detect
this in any reliable way. All you could do is detect it for some servers...
QA Contact: tever → benc
forget my suggestion about the UI.

Thanks for the various bits of information on my question.
changed URL from:
http://www.ctan.org/tex-archive/help/Catalogue/entries/quotes.html

Did anyone verify this? I get the same 550 error as reported before, Mozilla
1.0RC1, Win98.

I think I got this to work by going to the "/" dir-level, then requesting the
.tar.gz.

Is this how it should work?
REOPEN:
Mozilla 1.1b, Win 98.
I'm clicking the URL link, and I get a 550. I've checked the dir to make sure it
exists as:

ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/bosisi/

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
we had this at some point, but it broken some ftp sites.
Keywords: helpwanted
Target Milestone: --- → Future
we should contact  robbe@orcus.priv.at the one who wrote the patch. he removed himself from this bug
never mind, the reporters are cc automatically. i'm so dumb

i hope that mail is still accurate
I hear ya...

First off, the URL was no longer valid. Corrected. You may want to repeat your
tests.

It WFM with the new URL, but I'm using 1.0.0 still. I would be interested in
results with the trunk. If the only problem was the obsolete path, we can close
this again.
VERIFIED: wfm Mozilla 1.1, Mac OS X, Linux, Win32.
-> resolved/fixed (since there was a patch)
Status: REOPENED → RESOLVED
Closed: 23 years ago22 years ago
Resolution: --- → FIXED
Keywords: verifyme
mass remove verifyme requests greater than 4 months old
Keywords: verifyme
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: