Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi idHttp stürtzt ab (https://www.delphipraxis.net/32817-idhttp-stuertzt-ab.html)

citybreaker 28. Okt 2004 10:47


idHttp stürtzt ab
 
Hallo,
irgendwie hab ich ein Problem mit idHttp. Unzwar kommt bei einem klick
auf einen Button immer eine Fehlermeldung. (Wenn ich aus Delphi herraus
starte)
Zitat:

Im Proket Projek1.exe ist eine exception der Klasse EIdHTTPProtocolException
aufgetreten. Meldung: 'HTTP/1.1 302 Found'. Prozess wurde angehalten. Mit einzelne
Anweisung oder Start fortsetzten.
Wenn ich normal Starte (doppelklick auf die Exe) und den Button drücke
kommt.
Zitat:

HTTP/1.1 302 Found
Und noch schnell der Code. =)
Delphi-Quellcode:
    sl := TStringList.Create;
    sl.add('Vorname=' + Edit1.Text);
    sl.add('Name=' + Edit2.Text);
    sl.add('Nick=' + Edit3.Text);
    sl.add('Passwort=' + Edit4.Text);
    sl.add('Mail=' + Edit5.Text);
    sl.add('Homepage=' + Edit6.Text);
    sl.add('Geburtstag=' + Edit7.Text + '.' + Edit8.Text + '.' + Edit9.Text);

    s := idHttp.Post(scripturl,sl);
    FreeAndNil(sl);

vlees91 28. Okt 2004 10:56

Re: idHttp stürtzt ab
 
muss man nicht 3 parameter angeben?
der letzte ist ein TStream, oder ist dieser optional, wegen dem const?

citybreaker 28. Okt 2004 11:56

Re: idHttp stürtzt ab
 
Öhm ne, in nem anderen Programm klappt das. Und hier kommt ne Fehlermeldung
aus welchem Grund auch immer. :cry:

endeffects 28. Okt 2004 12:31

Re: idHttp stürtzt ab
 
302 ist der return code für eine automatische weiterleitung,
du musst AllowRedirects auf True setzen für idHTTP

citybreaker 28. Okt 2004 15:32

Re: idHttp stürtzt ab
 
Zitat:

Zitat von endeffects
302 ist der return code für eine automatische weiterleitung,
du musst AllowRedirects auf True setzen für idHTTP

AllowRedirects gibt es bei idHttp nicht, ich kann es im OI zumindest
nicht finden. :roll:

sakura 28. Okt 2004 15:34

Re: idHttp stürtzt ab
 
Zitat:

Zitat von citybreaker
AllowRedirects gibt es bei idHttp nicht, ich kann es im OI zumindest
nicht finden. :roll:

Dann schaue mal, ob es nicht etwas gibt, das sich evtl. ähnlich nennt, z.B. HandleRedirects und RedirectMaximum.

...:cat:...

endeffects 28. Okt 2004 15:36

Re: idHttp stürtzt ab
 
ups, mein fehler

citybreaker 28. Okt 2004 19:20

Re: idHttp stürtzt ab
 
--- Edit ---
Geht jetzt alles war nen Fehler im Php Script und die Datei im Netz
hierß anders. :duck:

endeffects 28. Okt 2004 19:32

Re: idHttp stürtzt ab
 
ich würde dir empfehlen einen proxy oder packetsniffer zu nutzen
um das packet mit indy nachvollziehn zu können, nahelegen würde ich
dir charles (http://www.xk72.com/charles/) ein proxy der auch
ssl encrypted, ansonsten ist auch etherdetect (http://etherdetect.com/)
sehr nett sofern du mehr als nur http requests analysieren willst

speziell bei charles hast du die möglichkeit indy für die nutzung
eines lokalen proxys einzurichten (charles lauscht auf: 127.0.0.1:8080),
damit kannst du die requests von indy und deines browsers vergleichen

ich hoffe ich konnte dir ein wenig helfen
mfg


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:51 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz