#988979 libwww-perl: Peculiar 308 Permanent redirect causes LWP::UserAgent to return an error

#988979#5
Date:
2021-05-22 11:41:42 UTC
From:
To:
Dear Maintainer,


I'm using LWP::UserAgent to fetch json information: the page
https://www.radiotimes.com/film/g6j5ty/well-meet-again is showing the failure
today.

This results in a "308 Permanent redirect".  Using wget suggests that the
redirect is just the original URL with a '/' at the end.

But LWP::UserAgent returns with is_success false, and the response request->uri
method returns the original URL without the '/'.

A hack of detecting the combination of status 308 and an unchanged URL and
manually attaching a '/' has got it working again, but hardly seems correct.

It would seem more consistent with the way LWP::UserAgent handles redirects to
perform the redirect, while reporting the redirect target correctly through the
response request->uri method.

#988979#10
Date:
2022-07-14 14:46:00 UTC
From:
To:
Version: 6.49-1

According the the upstream Changes file:

6.48      2020-09-20 15:25:51Z
    - Support 308 Permanent Redirect (GH#349) (Galen Huntington)

this should be fixed by now.

Sorry for coming back the this issue so late …


Cheers,
gregor