/usr/bin/ftp: 308 Permanent Redirect

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

/usr/bin/ftp: 308 Permanent Redirect

Christopher Zimmermann-2
Hi,

to me it seems that since our ftp does only support GET requests anyway,
a 308 Redirect response can be handled identical to a 301 Redirect. OK?

Christopher


Index: fetch.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/fetch.c,v
retrieving revision 1.184
diff -u -p -r1.184 fetch.c
--- fetch.c 9 Dec 2019 19:05:06 -0000 1.184
+++ fetch.c 14 Dec 2019 11:10:09 -0000
@@ -834,6 +834,7 @@ noslash:
  case 302: /* Found */
  case 303: /* See Other */
  case 307: /* Temporary Redirect */
+ case 308: /* Moved Permanently */
  isredirect++;
  if (redirect_loop++ > 10) {
  warnx("Too many redirections requested");


--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
CB07 DA40 B0B6 571D 35E2  0DEF 87E2 92A7 13E5 DEE1

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ftp: 308 Permanent Redirect

Jeremie Courreges-Anglas-5
On Sat, Dec 14 2019, Christopher Zimmermann <[hidden email]> wrote:
> Hi,

Hi,

> to me it seems that since our ftp does only support GET requests anyway,
> a 308 Redirect response can be handled identical to a 301 Redirect. OK?

ok jca@

Do you need this for particular websites / implementations?

> Christopher
>
>
> Index: fetch.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/ftp/fetch.c,v
> retrieving revision 1.184
> diff -u -p -r1.184 fetch.c
> --- fetch.c 9 Dec 2019 19:05:06 -0000 1.184
> +++ fetch.c 14 Dec 2019 11:10:09 -0000
> @@ -834,6 +834,7 @@ noslash:
>   case 302: /* Found */
>   case 303: /* See Other */
>   case 307: /* Temporary Redirect */
> + case 308: /* Moved Permanently */
>   isredirect++;
>   if (redirect_loop++ > 10) {
>   warnx("Too many redirections requested");

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ftp: 308 Permanent Redirect

Klemens Nanni-2
In reply to this post by Christopher Zimmermann-2
On Sat, Dec 14, 2019 at 12:11:41PM +0100, Christopher Zimmermann wrote:
> to me it seems that since our ftp does only support GET requests anyway, a
> 308 Redirect response can be handled identical to a 301 Redirect. OK?
OK kn with one thing:

> Index: fetch.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/ftp/fetch.c,v
> retrieving revision 1.184
> diff -u -p -r1.184 fetch.c
> --- fetch.c 9 Dec 2019 19:05:06 -0000 1.184
> +++ fetch.c 14 Dec 2019 11:10:09 -0000
> @@ -834,6 +834,7 @@ noslash:
>   case 302: /* Found */
>   case 303: /* See Other */
>   case 307: /* Temporary Redirect */
> + case 308: /* Moved Permanently */
Please say "Permanent Redirect" as that is 308, "Moved Permanently" is
301.