mrw wrote:
> I think I've found the problem. It's a "new LMS problem" in my view,
> triggered by the use of a proxy server. "New", because I think
> historically servers have tolerated an unnecessary fragment suffix in a
> GET request. But perhaps the BBC Servers (and others ?) are becoming
> less tolerant.
>
> >
Code:
--------------------
> >
> In package Slim::Networking::Async::HTTP;
>
> sub _format_request {
> my $self = shift;
>
> my $fullpath = $self->request->uri->path_query;
> $fullpath = "/$fullpath" unless $fullpath =~ /^\//;
> Yields /radio/aod/availability/bbc_radio_ulster.xml
> # Proxy requests require full URL
> if ( $self->use_proxy ) {
> $fullpath = $self->request->uri->as_string;
> Yields
http://www.bbc.co.uk/radio/aod/availability/bbc_radio_ulster.xml#extra
> Which the BBC servers have decided to "choke" on
> Note that this code path is never used with https
>
> }
> <snip>
>
--------------------
> >
>
> If @pshepherd were to adapt his -Slim::Networking::Async::HTTP- to
> strip off a fragment suffix I'll hazard a guess that matters would
> proceed smoothly.
>
> My guess is that -HTTP::Request- handles this for us when it builds
> the -path_query-. But the proxy request logic doesn't. Possibly the
> answer is to have - _format_request- just strip any fragment suffix it
> may find.
>
>
> Here's my UK -dig-. You'll appreciate that I don't think it is
> relevant to the problem.
>
> >
Code:
--------------------
> >
> dig www.bbc.co.uk
>
> ; <<>> DiG 9.11.5-P4-5.1+deb10u1-Debian <<>> www.bbc.co.uk
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29012
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
>
> ;; OPT PSEUDOSECTION:
> ; EDNS: version: 0, flags:; udp: 512
> ;; QUESTION SECTION:
> ;www.bbc.co.uk. IN A
>
> ;; ANSWER SECTION:
> www.bbc.co.uk. 230 IN CNAME www.bbc.net.uk.
> www.bbc.net.uk. 281 IN A 212.58.237.251
> www.bbc.net.uk. 281 IN A 212.58.233.251
>
> ;; Query time: 5 msec
> ;; SERVER: 192.168.1.254#53(192.168.1.254)
> ;; WHEN: Tue Jul 28 17:31:08 BST 2020
>
--------------------
> >
>
>
> I don't have the problem, because, I think, I don't use a proxy
> server.
>
> I haven't tried using https. That might be a different code path.
> Would need to check how it works in the context of a proxy.
I have edited the perl code as follows:
Code:
--------------------
sub _format_request {
my $self = shift;
my $fullpath = $self->request->uri->path_query;
$fullpath = "/$fullpath" unless $fullpath =~ /^\//;
# Proxy requests require full URL
# if ( $self->use_proxy ) {
# $fullpath = $self->request->uri->as_string;
# }
--------------------
and restarted LMS. If I click on Radio 3 for example I now get the
following error: Failed to retrieve listing. (400 Invalid header
received from client)
Radio 1, with the edited default.opml still works.
Paul
------------------------------------------------------------------------
pshepherd's Profile: http://forums.slimdevices.com/member.php?userid=9779
View this thread: http://forums.slimdevices.com/showthread.php?t=109826
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins