[gopher] First shot at a gopher mole - results vary, but why?
Cameron Kaiser
spectre at floodgap.com
Sat Jan 25 18:12:19 UTC 2014
[Charset utf-8 unsupported, filtering to ASCII...]
> Hi all,
>
> I've knocked up a quick script - gopher mole - as the possible basis for a
> database search tool. Please note that there's no attempt at sanitising
> user input yet ;-) it's called as a type '7___.
>
> I've found that it works fine with Mac Camino and the gopherproxy.meulie.net
> but not with iGopher on the iPad or the Floodgap.com proxy. When it
> "doesn't work", it only displays the link back to my main gopher page.
>
> Here's the script.. Any advice welcome!
The problem is this line:
> if ( $SELECTOR =~ /^$REQUEST[?](.*)/ )
While some browsers use "?" to separate selector from arguments, the
correct way is to use the tab "\t" or 0x09 character. If you change this
line to accept either character, like
/^$REQUEST[\?\t](.*)/
then it should work. However, Bucktooth already gives you the arguments:
look at @ARGV. You don't need to parse them again. It does all the hard work
like finding the delimiter and doing any necessary decoding.
--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckaiser at floodgap.com
-- There's a sucker born every minute. -- P. T. Barnum ------------------------
More information about the Gopher-Project
mailing list