Bug 45127 - [GTK][Soup] implement local directory listing.
Summary: [GTK][Soup] implement local directory listing.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
: 26348 (view as bug list)
Depends on:
Reported: 2010-09-02 13:32 PDT by arno.
Modified: 2010-10-21 07:48 PDT (History)
3 users (show)

See Also:

patch v1 (11.10 KB, patch)
2010-09-02 13:54 PDT, arno.
mrobinson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description arno. 2010-09-02 13:32:50 PDT
Currently, it's possible to display a local file with soup backend, but not to display a directory content.

there is a fixme in ResourceHandleSoup.cpp
// FIXME: what if the URI points to a directory? Should we
// generate a listing? How? What do other backends do here?
Comment 1 arno. 2010-09-02 13:54:12 PDT
Created attachment 66407 [details]
patch v1

Here is a first attempt:
As there already exist a FTPDirectoryDocument, I choose to use it.
So, soup backend set mime type to application/x-ftp-directory and sends data similar to a ftp directory. 
I discovered in FTPDirectoryParser.cpp there are many ftp listing formats, so I choose EPLF because it's the first one checked in parseOneFTPLine. I don't known if it's good choice especially since it's currently broken (bug #45113), but that can probably be easily changed.

If the trick of using application/x-ftp-directory mime type is not a good idea, may be we can create a LocalDirectoryDocument, and create our own scheme, or we can also use mozilla's dir index format. http://www.mozilla.org/projects/netlib/dirindexformat.html (but may it's better to not have two kind of parsers and documents for ftp and local directories)
Comment 2 Martin Robinson 2010-09-15 11:52:58 PDT
arno, I've CC'd Sergio on this to see if he has any comments. I think maybe his work intersects with this to some degree.
Comment 3 Sergio Villar Senin 2010-09-20 01:21:29 PDT
(In reply to comment #2)
> arno, I've CC'd Sergio on this to see if he has any comments. I think maybe his work intersects with this to some degree.

Absolutelly, thx Martin for Cc'ing here.

The new SoupURILoader stuff adds local directory listing to libsoup. Since all that will be imported to webkit with the new HTTP cache (https://bugs.webkit.org/show_bug.cgi?id=44261) that will be automagically fixed.
Comment 4 Martin Robinson 2010-09-21 10:37:12 PDT
Comment on attachment 66407 [details]
patch v1

r- based on Sergio's comments. Let's reapproach this once the caching stuff lands.
Comment 5 Sergio Villar Senin 2010-10-13 03:23:52 PDT
BTW isn't this a dup of https://bugs.webkit.org/show_bug.cgi?id=26348?
Comment 6 Martin Robinson 2010-10-13 07:54:36 PDT
Yeah, I think we should close this because we'll have this feature once cache support lands.
Comment 7 Martin Robinson 2010-10-13 08:18:23 PDT
*** Bug 26348 has been marked as a duplicate of this bug. ***
Comment 8 Sergio Villar Senin 2010-10-21 03:46:26 PDT
I guess we can safely close this now
Comment 9 Martin Robinson 2010-10-21 07:48:40 PDT
Should we open a bug about making it pretty?