Gentoo Archives: gentoo-user-de

From: Jan Kohnert <nospam001-lists@×××××××××××××.org>
To: gentoo-user-de@l.g.o
Subject: [gentoo-user-de] [OT] Nochmal python...
Date: Sun, 11 Sep 2005 17:09:02
Message-Id: 200509111907.36283.nospam001-lists@jankoh.dyndns.org
1 Hallo ihr,
2
3 eine Frage zu python hab ich jetzt schon noch:
4
5 Kann ich mit dem httplib Modul direkt Authorization erreichen?
6
7 Den Umweg über das urllib module will ich mir nämlich eingentlich sparen...
8
9 Ich dachte so an:
10
11 connect = httplib.HTTPSConnection("$SERVER")
12 connect.connect.request("GET", "$DATEI", "Authorization: Basic reallm")
13 answer = connect.getresponse()
14 print answer.status
15
16 reallm ist natürlich base64-endcoded $USER:$PASSWORD
17
18 Funktioniert so aber nicht. Ich krieg ein 401 und Authentifizierung findet
19 nicht wirklich statt.
20
21 Kann mir da jemand auf die Sprünge helfen?
22
23 MfG Jan
24
25 --
26 OpenPGP Public-Key Fingerprint:
27 0E9B 4052 C661 5018 93C3 4E46 651A 7A28 4028 FF7A

Replies

Subject Author
Re: [gentoo-user-de] [OT] Nochmal python... Jan Kohnert <nospam001-lists@×××××××××××××.org>