[email protected] writes: > Hallo zusammen, > > ich arbeite mich ein wenig in die Client-Server Programmierung mit Python > ein. Ich verwende WingIDE 6 (https://wingware.com/downloads). > > Anbei der Code für den Client (3-2_tcp-client.py): > > -- schnipp -- > import socket > > target_host = "www.google.com" > target_port = 80
[...] > Wenn ich dann das Skript "3-2_tcp-client.py" starte, erhalte ich folgende > Ausgabe: > > [evaluate 3-2_tcp-client.py] > HTTP/1.1 302 Found > Cache-Control: private > Content-Type: text/html; charset=UTF-8 > Referrer-Policy: no-referrer > Location: http://www.google.de/?gfe_rd=cr&dcr=0&ei=eLgBWqW4BqqE8QewsLXQAg > Content-Length: 268 > Date: Tue, 07 Nov 2017 13:43:20 GMT > > <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> > <TITLE>302 Moved</TITLE></HEAD><BODY> > <H1>302 Moved</H1> > The document has moved > <A > HREF="http://www.google.de/?gfe_rd=cr&dcr=0&ei=eLgBWqW4BqqE8QewsLXQAg">here</A>. > </BODY></HTML> > > Wie muss ich die beiden Skripte handhaben, um die gewünschte Ausgabe > zu erhalten? Naja, wenn Du einen Request zu google.com schickst, dann bekommst Du auch von da Antwort... Gruß Christoph _______________________________________________ Trolug_trolug.de mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/trolug_trolug.de
