AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Indy HTTPServer - Komprimierung möglich?
Thema durchsuchen
Ansicht
Themen-Optionen

Indy HTTPServer - Komprimierung möglich?

Ein Thema von crypti · begonnen am 9. Jul 2005 · letzter Beitrag vom 6. Sep 2005
Antwort Antwort
Seite 1 von 2  1 2      
crypti

Registriert seit: 12. Feb 2005
43 Beiträge
 
#1

Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 17:44
hi

ich versuche gerade über den indy HTTPServer einige automatisch generiete Seiten anzuzeigen. Es es möglich, eine Art Kompression (ala gzip o.ä.) mit zu integrieren oder zu aktivieren?

danke euch

crypti
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#2

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 17:46
willst du eine komprimierte Datei dem Browser zurück liefern oder die Seiten komprimiert übertragen? Unterstützen das die Browser überhaupt das der Server komprimierte Seiten zurück liefert???
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
crypti

Registriert seit: 12. Feb 2005
43 Beiträge
 
#3

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 17:57
ich will die seite komprimiert übertragen lassen. So wie man das auch beim "richtigen" Webserver machen kann.
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#4

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 18:01
nach meinem Kenntnisstand wird das von den Indies nicht direkt unterstützt. allerdings könntest du dich informieren wie das ganze protokolmäßig von statten geht und dann die comprimierung selbst durchführen und per Header dem Browser das auch mitteilen das die Datei komprimiert übertragen wurde (fall das überhaupt sache des browsers ist was ich bezweifel)
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#5

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 18:10
Zitat von SirThornberry:
Unterstützen das die Browser überhaupt das der Server komprimierte Seiten zurück liefert???
Der Server darf nur das Content-Encoding liefern, welches zum Accept-Encoding des Client passt.

Zitat von SirThornberry:
nach meinem Kenntnisstand wird das von den Indies nicht direkt unterstützt.
Auf meiner Maschine ist Indy 9 installiert und soll es können. Dazu gibt es extra die Komponente TIdCompressionIntercept.

Grüße vom marabu
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#6

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 19:46
hmm, die komponenten kenne ich nicht, also wird es wohl doch unterstützt -> Indyhilfe dazu lesen
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#7

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 20:11
Die Online-Hilfe habe ich gerade gefressen - und bin zu dem vorläufigen Schluss gekommen, dass dein Kenntnisstand vielleicht gar nicht so verkehrt ist. Die Intercept-Komponente hat zwei Events - OnReceive() und OnSend() - die erhalten einen Stream als Parameter. Ich vermute, dass die Intercept-Komponente nur den Zugang zum Download-(Upload-)Stream offen legt, wundere mich aber, warum sie Compress im Namen trägt...

marabu
  Mit Zitat antworten Zitat
MrKnogge

Registriert seit: 9. Jun 2003
Ort: Pforzheim
2.458 Beiträge
 
Delphi 2007 Professional
 
#8

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 20:18
Zitat von marabu:
wundere mich aber, warum sie Compress im Namen trägt...
Eventuell comprimiert sie automatisch ?
Christian Bootz
Einstein ist tot, Newton ist tot,
und mir ist auch schon ganz schlecht...
  Mit Zitat antworten Zitat
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#9

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 20:26
Das war meine ursprüngliche Interpretation, aber Genaueres erfahren wir nur wenn es jemand ausprobiert...

marabu
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#10

Re: Indy HTTPServer - Komprimierung möglich?

  Alt 9. Jul 2005, 20:29
Laut Hilfe komprimiert diese Komponente auch. Über das property CompressionLevel kann man dies einstellen. Hilfe Seite:
Code:
Implements an intercept that compresses a data stream using zlib.

TIdCompressionIntercept = class(TIdConnectionIntercept)

Description

TIdCompressionIntercept is a TIdConnectionIntercept descendant that implements an Indy intercept component that compresses a data stream using the open-source zlib compression library. Set the CompressionLevel property to a value between 1 and 9 to enable compressing of the data stream. A setting of 0(zero) disables compression and the component is dormant. The sender *and* received must have compression enabled in order to properly decompress the data stream. They do *not* have to use the same CompressionLevel as long as they are both set to a value between 1 and 9.

In order for this file to compile on Windows, the follow .obj files *must* be provided as delivered with this file:

deflate.obj
   inflate.obj
   inftrees.obj
   trees.obj
   adler32.obj
   infblock.obj
   infcodes.obj
   infutil.obj
   inffast.obj


On Linux, the shared-object file libz.so.1 *must* be available on the system. Most modern Linux distributions include this file.

You may sometimes get the following compiler errors with this file:

    IdCompressionIntercept.pas(331) Error: Incompatible types

    IdCompressionIntercept.pas(152) Error: Unsatisfied forward or external declaration: '_tr_init'

    IdCompressionIntercept.pas(153) Error: Unsatisfied forward or external declaration: '_tr_tally'

    IdCompressionIntercept.pas(154) Error: Unsatisfied forward or external declaration: '_tr_flush_block'

    IdCompressionIntercept.pas(155) Error: Unsatisfied forward or external declaration: '_tr_align'

    IdCompressionIntercept.pas(156) Error: Unsatisfied forward or external declaration: '_tr_stored_block'

    IdCompressionIntercept.pas(157) Error: Unsatisfied forward or external declaration: 'adler32'

    IdCompressionIntercept.pas(158) Error: Unsatisfied forward or external declaration: 'inflate_blocks_new'

    IdCompressionIntercept.pas(159) Error: Unsatisfied forward or external declaration: 'inflate_blocks'

    IdCompressionIntercept.pas(160) Error: Unsatisfied forward or external declaration: 'inflate_blocks_reset'

    IdCompressionIntercept.pas(161) Error: Unsatisfied forward or external declaration: 'inflate_blocks_free'

    IdCompressionIntercept.pas(162) Error: Unsatisfied forward or external declaration: 'inflate_set_dictionary'

    IdCompressionIntercept.pas(163) Error: Unsatisfied forward or external declaration: 'inflate_trees_bits'

    IdCompressionIntercept.pas(164) Error: Unsatisfied forward or external declaration: 'inflate_trees_dynamic'

    IdCompressionIntercept.pas(165) Error: Unsatisfied forward or external declaration: 'inflate_trees_fixed'

    IdCompressionIntercept.pas(166) Error: Unsatisfied forward or external declaration: 'inflate_trees_free'

    IdCompressionIntercept.pas(167) Error: Unsatisfied forward or external declaration: 'inflate_codes_new'

    IdCompressionIntercept.pas(168) Error: Unsatisfied forward or external declaration: 'inflate_codes'

    IdCompressionIntercept.pas(169) Error: Unsatisfied forward or external declaration: 'inflate_codes_free'

    IdCompressionIntercept.pas(170) Error: Unsatisfied forward or external declaration: '_inflate_mask'

    IdCompressionIntercept.pas(171) Error: Unsatisfied forward or external declaration: 'inflate_flush'

    IdCompressionIntercept.pas(172) Error: Unsatisfied forward or external declaration: 'inflate_fast'

    IdCompressionIntercept.pas(189) Error: Unsatisfied forward or external declaration: 'deflateInit_'

    IdCompressionIntercept.pas(196) Error: Unsatisfied forward or external declaration: 'deflate'

    IdCompressionIntercept.pas(203) Error: Unsatisfied forward or external declaration: 'deflateEnd'

    IdCompressionIntercept.pas(213) Error: Unsatisfied forward or external declaration: 'inflateInit_'

    IdCompressionIntercept.pas(220) Error: Unsatisfied forward or external declaration: 'inflate'

    IdCompressionIntercept.pas(227) Error: Unsatisfied forward or external declaration: 'inflateEnd'

    IdCompressionIntercept.pas(234) Error: Unsatisfied forward or external declaration: 'inflateReset'

    Indy40.dpk(196) Fatal: Could not compile used unit 'IdCompressionIntercept.pas'

   

Do not be alarmed. This is due to a bug in DCC32 in Delphi 4, 5, 6, plus C++Builder, 4, 5, and 6.

There is a workaround for this issue. The workaround is to compile this unit separately from the other units and than build Indy with a command such as DCC32 using the /M parameter. DO not use the /B parameter as that does force everything to be recompiled triggering the DCC32 error.

The batch files FULLC4.BAT, FULLC5.BAT, FULLC6.BAT, FULLD4.BAT, FULLD5.BAT and FULLD6.BAT now have the workaround in them so we recommend that you use those to build Indy.

Borland is aware of the issue.

Original Author: Allen Bauer

This source file is submitted to the Indy project on behalf of Borland Sofware Corporation. No warranties, express or implied are given with this source file.
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:22 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