[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] Gopher: "GET /" urls with query string
From: |
Thomas Dickey |
Subject: |
Re: [Lynx-dev] Gopher: "GET /" urls with query string |
Date: |
Sun, 28 Apr 2019 20:50:26 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Apr 18, 2019 at 05:49:42PM +0200, Tobias Girstmair wrote:
> G'day,
>
> I'm working on a gopher server implementation [1] and rewriting HTTP-URLs to
> use the "GET /" syntax[2], as understood by lynx. However, I'm having
> trouble with URLs with a query string (in particular, wordpress short URLs):
> lynx always escapes the question mark to %3f. Then, the server (rightfully)
> complains that the resource wasn't found.
>
> My gophermap contains this line:
> hMy Blog Post GET /?p=1245 domain.net 80
>
> and when visiting it, lynx then tries access [3]:
> GET /%3fp%3d1245 HTTP/1.0
>
> instead of the correct:
> GET /?p=1245 HTTP/1.0
>
> It looks to me that the decision to redirect the request onto the WWW
> happens after the URL escaping, so my question is: Is this intended
> behaviour or a bug? (as a bonus Q: any ideas how to get around it?)
I'm not sure (without setting up a test so that I can read the trace, etc):
That is,
lynx -trace
with the right setup.
> greetings,
> Tobias
>
> [1]: as one does, in 2019 :^)
> [2]:
> https://github.com/kurtchen/Lynx/blob/8b3a9d48dc6737e2062c5678a28e2829f05094d0/src/LYGetFile.c#L719
That's a little old - you might want to compare with
https://github.com/ThomasDickey/lynx-snapshots
(though I don't recall changing anything for gopher in _that_ file)
> [3]: verified by redirecting domain.net to localhost and running 'nc -l 80'
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature