Re: new redirection codes

Thomas Dickey <[email protected]> Fri, 1 Aug 2025 20:01:19 -0400
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
On Sun, May 11, 2025 at 07:11:36PM -0400, Thomas Dickey wrote:
> On Mon, May 12, 2025 at 12:43:06AM +0200, Thorsten Glaser wrote:
> > Hi,
> > 
> > lynx only supports the old 301/302 redirection codes,
> > not the new 307/308 ones whose semantics are more useful;
> > unsure (I’ve not tested it) whether 303 is supported right.
> > 
> > 301/302 may change the request method from POST to GET
> > (IIRC lynx asks interactively which is good), whereas
> > 308/307 (in this order) are the same but require the client
> > to resend exactly the same request to the redirection target.
> > 
> > There’s more explanation and a short summary of the other
> > codes in both answers (together) of
> > <https://stackoverflow.com/q/42136829/2171120> for reference.

It's kind of long - it would help if you pointed out the specific
case which you believe is mishandled, and a URL which can demonstrate
the problem.

> > Please add support for 307/308 to the next lynx (basically
> > same as the existing redirect sans the interactive question).
> 
> I don't see a patch.

Also, I didn't see a site which was reported to be handled incorrectly.
I looked for a suitable site, and found this (which doesn't rely upon
JavaScript):

	https://demo.cyotek.com/statuscodes/index.php

...and lynx appears to be working as intended (the odd handling of 304
is intentional).  Lynx's handling of 308 was improved in

2024-01-15 (2.9.0)
* treat HTTP 308 permanently redirected the same as HTTP 301 permanently moved
  (Debian #1041686).

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmiNVUsACgkQzCr0RyFn
vgOx7wv/S0YqK4uL/ajN/8LmdBwWRp1+Jl3PdEFPyI1f5G6ZxFdclfF00z7N1HMm
4k0NWhHAMXs5wjwN5yZodJFJzxunCm2FCU/HI7HlM9O0FeT+QxBuat/ep0O/7VLz
2X/ZGfo7fiXa3o6o3HTHEWRoDizxTeZFxIuVjF7nluTIYecZC15m29iCoCXvhJWn
4N60lIy6oUPe2bTBTiLbLjz4iqyzYZXcdmmSIeXCuY8Kh+DGGJus9nVQE1ExuQ3X
rW9haZjR0fYfOxATo6yionyfYm30h2eQ5yVPg51aIeKXscSlSQPx379hKe2HSSLB
h0YHSiKKAPn3loO2IFUDH7MOC8xC32Ek2KfiEamKuGcog3Nlr5qfZ6tmhTY0Y8Bc
7vOERzRN5KNvzioMvyfzPxdzOQz+6rztn5y25Q1F4wy3HEvVf69WMw7tNHLxdn7m
QcExreOuTuGruQ6FYAeOitIqhotiFlSs0f0somP77+7A4nNm1/M9qRuKkjxTMnUu
jI3HhSBg
=1Yuf
-----END PGP SIGNATURE-----