hns - 日記自動生成システム - Version 2.19.7

void GraphicWizardsLair( void ); //

otsune GWL
FreeBSD, AfterEffects, RETAS, animo, DigitalAnime, Linux, Mac OS, Win2k

[Who is otsune?] [title] [message] [Policy] [注目エントリー] [top]
Twitter Status :


Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい

検索式:

先月 2001年09月 来月
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30


2001年09月19日(水) [長年日記]

アラジン・土瓶・オサマ・ビン

#9 [unix] cgiをgzipで圧縮して転送する方法。

コンテントタイプ出力を以下のコードと置き換える。
if($ENV{"HTTP_ACCEPT_ENCORDING"}=~/gzip/ ){
	print "Content-type: text/html\n\n";
	print "Content-encording: gzip\n\n";
	open (STDOUT,"| /bin/gzip -1 -c");
}else{
	print "Content-type: text/html\n\n";
}
もしCGIサーバーの圧縮負荷が軽いようであれば、gzipのオプションの数字を高くする。ただ、-9まで高くしてもそれほど容量が減るわけではない。
Permalink: http://www.otsune.com/diary/2001/09/19/9.html#200109199
trackback
このエントリーを含むはてなブックマーク del.icio.us livedoor Clip View blog reactions
Last Updated 2001-09-19 00:00:00 By otsune