Open dertuxmalwieder opened 8 years ago
@dertuxmalwieder, why not, I'm not familiar with gopher but it seems that it will require translation of replies into HTML plus some other stuff, so probably it would be best to have it as some sort of module that would be used by web backends for producing HTML etc. We could use it as example for other protocols in future.
Actually, it's not even "some other stuff". :-)
@dertuxmalwieder, so basically just detecting reply that needs to be transformed and translating it?
Yep. You'll send a very basic "request" to the Gopher server (usually running on port 70), i.e. the URL, and it will reply with a "Gopher page" that just needs to be translated into HTML. Should be achievable with simple search&replace.
Wikipedia example. The first line is the request, the rest is the Gopher page, each line being "an item".
@dertuxmalwieder, I see, in fact I've visited that article while determining fate of this ticket.
If you are still willing to give it a try then I think that the easiest way to create initial implementation (specific to QtWebKit) would be to hook it here:
https://github.com/OtterBrowser/otter-browser/blob/master/src/modules/backends/web/qtwebkit/QtWebKitNetworkManager.cpp#L693
Take a look at implementation of LocalListingNetworkReply
and QtWebKitFtpListingNetworkReply
(these two are a bit similar since both deal with file listing, you can also use some sort of template file if it makes sense) or at least read documentation of QNetworkReply
.
We can later try to create full blown generic implementation that could be supported also in QtWebEngine backend.
Looks like I could - more or less - copy the FTP implementation and rip out most of its commands. :-)
I'm still willing to give it a try, of course. I haven't had much spare time yet (and Otter keeps evolving)... but it's still on my list.
@dertuxmalwieder, yeah, we can discuss details on IRC when you will have some time. One of the topics I would like to care take of in next weeks would be enabling protocol handlers configuration (currently destined to become Programs section in Advanced, but that might change during redesign needed by transition to about:preferences) so it could be useful to take such handler modules into account.
I'll be on the IRC in approx. eight hours. I'll ping you. :)
@dertuxmalwieder, OK, but eight hours from now might be a bit late to catch me on IRC...
Well, I randomly see you talking when I'm online. Don't worry, I'll get you some day.
@dertuxmalwieder, OK.
Very different code bases make that relatively hard.
Patches are welcome. ;-)
I'd like to request support for the Gopher protocol, maybe as a module. I am willing to help to contribute it myself if I figure out how Otter determines a page's protocol... :)