Closed
Bug 64795
Opened 24 years ago
Closed 24 years ago
FTP requires frontend to parse html-indexed-format
Categories
(Core :: Networking: FTP, defect)
Core
Networking: FTP
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: dougt, Assigned: dougt)
Details
(Keywords: embed)
Attachments
(3 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/plain
|
Details |
FTP requires that the frontend parse html-indexed-format. Currently, mozilla
has a directory viewer which handles this format. It creates a RDF tree
displayed in xul. For embedding, this may not be possible due to memory
footprint issues.
FTP should optionally return the listing as html. What is required is a new
stream convert which can translate the html-indexed-format to html as well as a
pref which toggle which format is returned by the ftp channel.
Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9
Assignee | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 2•24 years ago
|
||
With this patch, and adding this pref "network.ftp.generate_html", ftp will
generate html. This allows embedders to ship without rdf, xul, chrome, and will
view FTP sites. It also allows quick isolation of problems between the
directory viewer (eg. the tree widget that you normally see) and the ftp protocol.
Jud/Gagan can one of you review please?
Comment 3•24 years ago
|
||
The patch doesn't apply on linux (RH7) -- patch doesn't understand the syntax
used to create the new files, and gets confused by the Makefile.in patch as well.
After I applied those parts of the patch by hand, it doesn't compile:
nsIndexedToHTML.cpp: In method `nsresult
nsIndexedToHTML::OnStartRequest (nsIRequest *, nsISupports *)':
nsIndexedToHTML.cpp:61: `buffer' undeclared (first use this function)
Looks like the line where buffer should be declared got deleted somehow.
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
nice! once these are compiling, I'd love to review. at first glance this looks
great.
Comment 6•24 years ago
|
||
Just looking at the patch:
network.dir.generate_html, instead? (Parsing the gopher output would require
copy-and-pasting from nsDirectoryViewer.cpp - maybe this could go there,
somehow, and share the parsing code. I could possibly do that at some point)
Handle201 calls nsUnescape before PL_strchr, but the buffer may refer to files
with embedded spaces (and won't the last-modified always have spaces in it?)
Won't this also break non-ASCII files? Everything is passed arround as ascii,
then .AppendWithConversion'd back into an nsString.
Updated•24 years ago
|
Comment 7•24 years ago
|
||
maybe the check could be if (XUL directory viewer doesn't exist) then use html?
Assignee | ||
Comment 8•24 years ago
|
||
Assignee | ||
Comment 9•24 years ago
|
||
I checked in the nsIndexedToHtml files into cvs. Also attached is the diff to
enable it on unix.
I have incorporated all suggestions, but I still need a r=
One thing to note, is that this is a rough cut of a Indexed to HTML converter.
We are only handling the 201 state. Any other states that are needed will come
is as bugs.
Comment 10•24 years ago
|
||
whoops missed something before. You're doing the chaining of stream
converters by hand. There's a ton of code to do the chaining from type A to type
X behind the scenes. Ray broke this code w/ his contract id landing several
months ago (ray, any chance of you coming out of the woodwork to fix it?). I
spent a lot of time building that breadth first search algorithm to do it and
I'll be damned if we're not going to use it.
Doug, did you have a chance to see how it broke and what a possible fix was?
Comment 11•24 years ago
|
||
This patch doesn't solve bug 70258 -- I still get the blue screen with the patch
applied and user_pref("network.ftp.generate_html", true) in user.js.
Assignee | ||
Comment 12•24 years ago
|
||
wierd akkana. I will drop by tomorrow to take a look at 70258.
I got a r= valeski this morning via the telephone. Mscott can I get a sr=?
Assignee | ||
Comment 13•24 years ago
|
||
Fix checked in. Give it a try today! :-)
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 14•24 years ago
|
||
Can't get it to work on Linux build 2001030621, I've tried setting the
pref("network.ftp.generate_html", true); in all.js without success and then
tried user_pref("network.ftp.generate_html", true); in my profiles prefs.js also
with no success.
I check to make sure that there was no other pref setting this value to false.
Expected result:
Get an HTML based directory listing
Actual result:
Get the XUL based directory listing
Comment 15•24 years ago
|
||
Did the same thing as David Hallowell, set both pref and user_pref in the
all.js file, using the 2001030605 build (win32 installer). FTP directories show
only as XUL (eg., as before), not HTML.
Assignee | ||
Comment 16•24 years ago
|
||
really? can you try with a new profile?
Comment 17•24 years ago
|
||
OK, I've created a new profile and still the same thing.
This is with a fresh install of Mozilla 2001030621 under Linux.
I'll attach a screenshot and a copy of prefs.js for this profile just in case
I'm doing something wrong.
Comment 18•24 years ago
|
||
Comment 19•24 years ago
|
||
I feel like a fool, I should have just had a look at the patch and I would have
realised where I was going wrong.
I should have set network.dir.generate_html as opposed to network.ftp.generate_html
Setting network.dir.generate_html is working fine although we do need a way of
going up to parent directories but that's another bug :)
Anyway, definitely works Linux x86 build 2001030621
Assignee | ||
Comment 20•24 years ago
|
||
Duh! I should have noticed that too.
Comment 21•24 years ago
|
||
Dougt said: "One thing to note, is that this is a rough cut of a Indexed to HTML
converter. We are only handling the 201 state. Any other states that are
needed will come in as bugs. "
Which states would you like me to file bugs against you for? :-)
Gerv
Comment 22•24 years ago
|
||
gerv: The ones needed for me to hook gopher up to this? :) (200 is the only
other used one, really)
/me ducks
Basically, nsHTTPIndexParser needs to be pulled out of nsDirectoryViewer.cpp
(and placed somewhere else), and given a set of callback functions. Its not as
simple at cut-and-pasting the code, because the parser isn't separated from the
RDF datasource. I think.
If you file a bug, please cc me on it.
Comment 23•24 years ago
|
||
Bradley: I'm way out of my depth here - I'm just a QA person ;-) Feel free to
file said bugs if you know what to say in them...
Gerv
Comment 24•24 years ago
|
||
Filed bug 72724 on getting gopher to do this.
You need to log in
before you can comment on or make changes to this bug.
Description
•