首页 > 未分类 > 源代码编译的httpd2.0.59,其xml文件的媒体类型竟然是application/xml

源代码编译的httpd2.0.59,其xml文件的媒体类型竟然是application/xml

2007年9月1日 发表评论 阅读评论

这个直接导致了我在apache里设置的对xml文件的压缩(deflate)未能成功
因为我的配置文件里是这么写的:

AddOutputFilterByType DEFLATE text/html text/plain text/xml

而且这种配置在系统自带的apache里是没有问题的
后来仔细查了查
发现系统自带的apache
用的是/etc/mime.types文件
而源代码编译的
用的则是conf/mime.types文件
这两个文件对xml文件的internet media type解释就是不一样:
一个认为是text/xml
另外一个则认为是application/xml
知道原因了
解决问题起来就顺利多了
把配置文件里AddOutputFilterByType那句后面加上application/xml
再重启就ok了

分类: 未分类 标签: ,
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word