XML RPC changes between 3.7 and 3.9 yield 401 http error

Chris Angelico rosuav at gmail.com
Wed Feb 24 12:48:14 EST 2021


On Thu, Feb 25, 2021 at 4:36 AM lucas <lucas at bourneuf.net> wrote:
> > A properly-formed URL will start with a protocol. I don't know
> > specifically what changed, but it's looking like something started
> > rejecting malformed URLs. Try adding "http://" or "https://" to your
> > URL (whichever is appropriate) and see if both versions will accept
> > it.
> >
> > ChrisA
> >
>
> I did that, obtaining the following URL
>
> https://wiki.[…]/lib/exe/xmlrpc.php?u=[…]&p=[…]
>
> on my two currently available computer (laptop on 3.9, remote on 3.7),
> and the results is the same.
>
> For information, i'm uploading the same python program to my remote
> server (debian, 3.7), and running it with the same parameters as my
> laptop (manjaro, 3.9). My laptop is getting the 401, my server is
> getting the expected dokuwiki version.

(I'm aware that you have some other actual domain, but I'll continue
using "wiki.example.net" as per your original post.)

Is it possible that there's some kind of server-based restriction?
What happens if you call socket.gethostbyname("wiki.example.net") on
both the laptop and the server - do you get back the same IP address?
(Or use gethostbyname_ex, or possibly getaddrinfo if ipv6 support
matters.)

Also, just to make sure there's nothing stupid happening, try printing
out the URL on both machines. Obviously censor the password before
sharing it here, but mainly, make sure that the two are generating the
exact same URL, just in case. Both are running 3.7+, so dict iteration
order shouldn't be getting in your way, but I've seen crazier things
before :)

ChrisA


More information about the Python-list mailing list