Autor Beitrag
Hendi48
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271



BeitragVerfasst: Do 28.06.07 20:26 
Hi,
also ich hab ein problem mit idHTTP. Ich habe diesen code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure tform2.postcode(URL: string; Filename: String);
var
data : TIdMultiPartFormDataStream;
files : Tfilestream;
link: string;
begin
link:=form2.edit2.text; // für den Aufruf, ich dachte das ändert was
files:= Tfilestream.create(Filename,fmcreate); // erstellt einen filestream
Data:=TIdMultiPartFormDataStream.Create;  
Data.AddFormField('accesscode','value='+form2.edit1.text); // tut den accesscode rein
form2.idHttp1.Post(url,data,files);  //postet zur url die data und soll files zurückbekommen
end;

Und der Aufruf: [In einem Speedbutton]
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
var
link: String;
begin
link:=label14.caption;     ////////////////////////////////////////
edit2.text:=link;          ////////Ich hatte das Gefühl das////////
link:=edit2.text;          ////////es was mit dem Link zu tun hat//
delete(link,1,1);          ////////(im Edit war immer ein space vorm link, das wird hierdurch weg gemacht)//
edit2.text:=link;          ////////////////////////////////////////
Application.ProcessMessages;
Postcode(link,'79-80.rar');

end;

aber trotzdem kommt immer wenn ich den speedbutton drück HTTP/1.1 404 Not Found.
Weiß einer von euch viell. warum?
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Do 28.06.07 20:33 
user profile iconHendi48 hat folgendes geschrieben:

aber trotzdem kommt immer wenn ich den speedbutton drück HTTP/1.1 404 Not Found.
Weiß einer von euch viell. warum?

Du hälst das jetzt vllt. für eine blöde Frage, aber du bist dir ganz sicher, dass die Datei auf dem Server, an die du via POST Daten verschickst, existiert?

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell
Hendi48 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271



BeitragVerfasst: Do 28.06.07 22:02 
ja bin ich , és liegt nich an der seite. selbst wenn die datei nich existiert bekommt man ne seite zurück
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Fr 29.06.07 17:06 
user profile iconHendi48 hat folgendes geschrieben:
ja bin ich , és liegt nich an der seite. selbst wenn die datei nich existiert bekommt man ne seite zurück

Ja, aber im HTTP-Header steht dann genau das, was idHTTP bei dir ausgibt: HTTP/1.1 404 File not found. Wenn die Datei existiert und der Server antwortet und sonst auch alles klappt (kein .htaccess und so), kommt doch afaik 305 OK, oder?

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell