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?
Created attachment 66407 [details]
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)
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.
(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 on attachment 66407 [details]
r- based on Sergio's comments. Let's reapproach this once the caching stuff lands.
BTW isn't this a dup of https://bugs.webkit.org/show_bug.cgi?id=26348?
Yeah, I think we should close this because we'll have this feature once cache support lands.
*** Bug 26348 has been marked as a duplicate of this bug. ***
I guess we can safely close this now
Should we open a bug about making it pretty?