On Fri, Jun 28, 2002 at 11:51:26AM +0200, Kosa Attila wrote:
On Fri, Jun 28, 2002 at 10:44:11AM +0200, Balazs Scheidler wrote:
On Fri, Jun 28, 2002 at 10:32:55AM +0200, Kosa Attila wrote:
Hello!
Http: * limitálható chunk méret (ld. Apache hiba)
Erre tudnatok mutatni egy peldat?
a chunk meret korlatozas illetve a letoltheto fileok korlatozasa teljesen mas teszta. chunkokat akkor hasznal egy webszerver, ha nem tudja elore, hogy milyen meretu lesz a valasza, ezert nem tudja beleirni a Content-Length fejlecbe, mivel az az adatresz elott van. Ilyenkor kb igy nez ki egy keres:
Koszonom a magyarazatot. Egy peldat is, please :)
class MyHttp(HttpProxy): def config(self): HttpProxy.config(self) self.max_chunk_length = 3
Amit te szeretnel az leginkabb URL szuressel megvalosithato:
class LimitedHttpProxy(HttpProxyURIFilter): matcher=RegexpFileMatcher('/etc/zorp/http.black', '/etc/zorp/http.white')
Igy probaltam: class IDHttp(HttpProxyURIFilter): def config(self): HttpProxyURIFilter.config(self) self.transparent_mode = 1 matcher=RegexpFileMatcher('/etc/zorp/http.black', '/etc/zorp/http.white')
ha config() methodba irod, akkor 'self.matcher = ...' kell, nem eleg a sima matcher. Az altalam irtnak az az elonye, hogy a fileokat csak egyszer olvassa fel, mig a config()-bol hivva annyiszor, ahanyszor a proxy elindul. (-> lassitja az inditast) -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1