[[ [解決済み] G-WAN の最新のアップデートで、このデフォルトの MIME タイプが修正されました。]]
G-WAN 4.3.11 は、すべての csp ファイルを「text/plain」タイプとして返します。どうすれば修正できますか?! 現時点では、静的ファイル サーバーにすぎません。
例: //127.0.0.1:8080/?hello.py は "Hello, Python!<br>" (テキスト/プレーンとして) で応答します。
これにより、「Hello, Python!」が返されます。<br> を表示せずに (text/html として)
ノート:
以前のバージョンの GWAN は正常に動作しています。Fedora 18 の実行
csp ソースがコンパイルされ、正しい出力が返されます。これは、サーバーが正しいコンテンツ タイプで応答しないという問題です。
.html ファイルは、必要に応じて text/html を返します。
Python: print(os.environ.get('CONTENT_TYPE')) は「なし」を返します
Python: os.environ['CONTENT_TYPE'] = 'text/html' は影響なし
リクエスト URL://localhost:8080/?hello.py リクエスト方法:GET ステータスコード:200 OK リクエスト ヘッダー GET /?hello.py HTTP/1.1 ホスト: ローカルホスト:8080 接続: キープアライブ キャッシュ制御: max-age=0 プラグマ: no-cache 受け入れる: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ユーザーエージェント: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (Gecko のような KHTML) Chrome/25.0.1364.160 Safari/537.22 Accept-Encoding: gzip、deflate、sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 クエリ文字列パラメーター こんにちは。 応答ヘッダー HTTP/1.1 200 OK サーバー: G-WAN 日付: 2013 年 3 月 12 日 (火) 18:50:33 GMT 最終更新日: 2013 年 3 月 12 日 (火) 18:50:33 GMT ETag: "c9ddeef-513f78fa-25" Vary: Accept-Encoding Accept-Ranges: バイト コンテンツ タイプ: テキスト/プレーン。文字セット=UTF-8 コンテンツの長さ: 37