Autor Beitrag
Crishnu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Mo 19.09.05 21:30 
Hi

Ich arbeite mit der Indy Komponente und
möchte, das bei dem String, den ich sende
"Accept-Encoding: gzip" steht.
Praktisch geht das per

ausblenden Delphi-Quelltext
1:
idhttp1.request.acceptencoding:='gzip';					



Wenn ich jedoch den string sende steht da immernoch
identity vor.

Kann mir da jemand weiterhelfen???


MFG

Moderiert von user profile iconKlabautermann: Delphi-Tags hinzugefügt.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 20.09.05 08:44 
Also dein Post ist ein wenig undurchsichtig, aber ich bin bis zu dieser Zeile noch mitgekommen:
user profile iconCrishnu hat folgendes geschrieben:
Wenn ich jedoch den string sende steht da immernoch
identity vor.

Kannst du das mal bitte irgedwie näher erläutern, was dann wo drinsteht ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Crishnu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Di 20.09.05 13:45 
Also es geht konkret darum:

Ich will, das wenn das Programm nen get Befehl sende, als Accept-Encoding: gzip steht.
Das hab ich auch mit der oben genannten zeile code gemacht.
Wenn ich das Programm benutze und nen get befehl sende steht unter
Accept-Encoding: identitygzip.

Hab das mit nem HTTP analyzer kontrolliert.

MFG
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 20.09.05 15:47 
haste die nueste version von INDY installiert ? den normalerweise dürfte das nicht sein !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Crishnu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Di 20.09.05 17:26 
Habe Version 10.0.20

EDiT: Hab jetzt die aktuelle Indy Version und es kommt der gleiche Fehler
Crishnu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Di 20.09.05 22:56 
So sieht es aus:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.Button1Click(Sender: TObject);
begin
idhttp1.Request.AcceptEncoding:='gzip';
idhttp1.Get('http://www.google.de')
end;

end.


wenn ich das programm ausführe und mit HTTP Analyzer abfang kommt das raus:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
Request Headers  Value                                   
(Request-Line)   GET / HTTP/1.1                          
Host             www.google.de                           
Accept           text/html, */*                          
Accept-Encoding  gzipidentity                            
User-Agent       Mozilla/3.0 (compatible; Indy Library)


wie man sieht, stimmt das mit dem gzip nicht.

MFG
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 21.09.05 08:36 
dan schinet das wirklich an den INDYs zu liegen.
Mach es dann einfach so:
lass es bleiben, in der Eigenschaft das gzip zu setzten und füg es stattdessen als Custom Header ein.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Crishnu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Mi 21.09.05 12:15 
Danke, für die Antwort, könntest du mir noch kurz
erklären wie das geht??

Thx
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 21.09.05 15:12 
zum beispiel so:
ausblenden Delphi-Quelltext
1:
idhttp1.Request.CustomHeaders.Add('Accept-Encoding=gzip');					

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Crishnu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Mi 21.09.05 16:14 
EDiT: Hab das Problem jetzt gelöst, musste was ind er http unit ändern, Thx für deine Hilfe.

Thx für die Antwort, es klappt zu Hälfte.

Wenn ich zum Beispiel das Eingebe:

ausblenden Delphi-Quelltext
1:
idhttp1.Request.CustomHeaders.Add('Acept-Encoding=gzip');					


wird mir hier das gemeldet:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
Request Headers  Value                                   
(Request-Line)   GET / HTTP/1.1                          
Host             www.google.de                           
Accept           text/html, */*
Acept-Encodeing  gzip                          
Accept-Encoding  identity                            
User-Agent       Mozilla/3.0 (compatible; Indy Library)


Wenn ich das jedoch richtig Eingebe:

ausblenden Delphi-Quelltext
1:
idhttp1.Request.CustomHeaders.Add('Accept-Encoding=gzip');					


Bekomme ich wieder das:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
Request Headers  Value                                   
(Request-Line)   GET / HTTP/1.1                          
Host             www.google.de                           
Accept           text/html, */*                          
Accept-Encoding  identity                            
User-Agent       Mozilla/3.0 (compatible; Indy Library)


Der sendet das Accept-Encoding identity immer mit, auch wenn ichs nicht requeste
und wenn ich versuche ne eigene Accept-Encoding Zeile in den Header zu schreiben ignoriert der die irgendie.

Achja, die aktuelle Indy Version is doch 10.0.52?
Ich hab eine ChangeLog von Indy 10.1.1 gefunden da steht folgendes drin:

Added comment regarding 'identity' and Request.AcceptEncoding
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 21.09.05 18:25 
dann scheints ja ein bug bei den indys zu sein. ich hab immernoch die 9er weil ich persönlich die besser finde...

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Crishnu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Mi 21.09.05 19:56 
Also in der Komponente wurde immer noch ein

ausblenden Delphi-Quelltext
1:
+'identity';					


gehangen