Forum: Cross-Platform-Entwicklung
by luisk,
29. Mai 2016
Jetzt würde mich doch noch interessieren, wie man
einen PHP gzcompress()string mit Delphi ZDecompressStr() entpacken kann.
Ich vermute, da muss die byte-Reihenfolge getauscht werden
https://de.wikipedia.org/wiki/Byte-Reihenfolge
Forum: Cross-Platform-Entwicklung
by luisk,
29. Mai 2016
Mich würde interessieren wie das geht. Das wäre mir lieber, wenn das klappt.
wenn ich ob_start('ob_gzhandler'); in php weglasse, wird nicht gezippt.
AddOutputFilterByType DEFLATE text/php text/plain bringt nichts
Forum: Cross-Platform-Entwicklung
by luisk,
29. Mai 2016
Mich würde dennoch interessieren,
ob man das nicht auch mit einer Delphi-Funktion wie gZDecompressStr() hinbekommt.
Forum: Cross-Platform-Entwicklung
by luisk,
29. Mai 2016
weitere Erkenntnis:
wenn ich nun in mein php-Script folgende Zeile einfüge:
ob_start('ob_gzhandler');
und TIdHTTP.Compressor:=TIdCompressorZLib; zuweise
dann klappt es :thumb:
Wenn ich TIdHTTP.Compressor:=nil; setze dann sehe ich, dass ein gezippter String kommt :idea:
So, später schaue ich mir dann mal WireShark ohne Firewall an.
Danke für die Hilfen.:thumb:
Forum: Cross-Platform-Entwicklung
by luisk,
29. Mai 2016
wo sollte Deiner Meinung nach ein Blank zu viel sein ?
hier ist ein ähnliches Bsp:
http://www.cyberciti.biz/faq/linux-unix-curl-gzip-compression-test/
Forum: Cross-Platform-Entwicklung
by luisk,
28. Mai 2016
Das hab ich probiert - Funktioniert aber nicht !
Diese Variante bleibt auch hängen :
Quelle:
https://www.experts-exchange.com/questions/21324779/Decompress-an-HTTP-GZIP-content.html
idhttp1.Intercept:= self.IdCompressionIntercept1;
ls := idhttp1.Put( l_url , nil );
hier kommt die Meldung "Dekomprimierungsfehler":
idhttp1.Intercept:= self.IdCompressionIntercept1;
Forum: Cross-Platform-Entwicklung
by luisk,
28. Mai 2016
das mit dem Zippen funktioniert doch auf der Serverseite
Das Problem liegt doch bei IdHTTP1: TIdHTTP; in meiner Delphi-FMX-Anwendung
Forum: Cross-Platform-Entwicklung
by luisk,
28. Mai 2016
weitere Versuche:
bleibt in einer Endlosschleife hängen:
idhttp1.Get( l_url , l_in_Stream );
ZDecompressStream(l_in_Stream, l_out_Stream );
bringt Data Error
idhttp1.Get( l_url , l_in_Stream );
GZDecompressStream(l_in_Stream, l_out_Stream );
Forum: Cross-Platform-Entwicklung
by luisk,
28. Mai 2016
ls=idhttp1.Put( l_url , nil );
liefert System.string
Vielleicht kann das mal noch jemand testen.
Forum: Cross-Platform-Entwicklung
by luisk,
28. Mai 2016
Delphi Version : 10 Seattle
ls : string;
Danke für die Tips, es haut immer noch nicht hin.
Vielleicht hat der eine oder andere das auch mal umgesetzt.
Forum: Cross-Platform-Entwicklung
by luisk,
27. Mai 2016
ja , das klappt einwandfrei. Ich kann den gezipten Code auch mit dem Debugger sehen.
Ohne Komprimierung läuft auch alles optimal.
Jetzt will ich halt noch die Übertragung optimieren.
Kann es sein, dass die Algorithmen von PHP und Delphi nicht zusammen passen ?