Hello, currently elinks does not convert Gopher URIs correctly to selectors.
According to RFC4266 [1] Gopher URIs are of the form gopher://<host>:<port>/<gopher-path> with <gopher-path> in the simplest case of the form: <gopher-type><selector> Two examples: gopher://sdf.org/1 gopher://gopher.floodgap.com/hURL:http://www.floodgap.com/ For some reason init_gopher_connection_info assumes that the first character of <selector> is '/', which breaks the two above examples. This has already been reported [2]. The attached patch fixes it for me. Cheers, Felix [1]: https://tools.ietf.org/html/rfc4266 [2]: http://bugzilla.elinks.cz/show_bug.cgi?id=1094
diff --git a/src/protocol/gopher/gopher.c b/src/protocol/gopher/gopher.c index f755d25..9b36979 100644 --- a/src/protocol/gopher/gopher.c +++ b/src/protocol/gopher/gopher.c @@ -283,7 +283,7 @@ init_gopher_connection_info(struct connection *conn) /* Get entity type, and selector string. */ /* Pick up gopher_entity */ - if (selectorlen > 1 && selector[1] == '/') { + if (selectorlen) { entity = *selector++; selectorlen--; }
_______________________________________________ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev