调试网页时出错,无意中发现出错页的源文件中有这样一段注释:

<title>404 Not Found</title>
<h1>404 Not Found</h1>
/asfsfdsd.jsp was not found on this server.
<p /><hr />
<small>
Resin 2.0.3 (built Wed Oct 17 10:11:08 PDT 2001)
</small>
</address>

<!--
  -- Unfortunately, Microsoft has added a clever new
  -- "feature" to Internet Explorer.  If the text in
  -- an error's message is "too small", specifically
  -- less than 512 bytes, Internet Explorer returns
  -- its own error message.  Yes, you can turn that
  -- off, but *surprise* it's pretty tricky to find
  -- buried as a switch called "smart error
  -- messages"  That means, of course, that many of
  -- Resin's error messages are censored by default.
  -- And, of course, you'll be shocked to learn that
  -- IIS always returns error messages that are long
  -- enough to make Internet Explorer happy.  The
  -- workaround is pretty simple: pad the error
  -- message with a big comment to push it over the
  -- five hundred and twelve byte minimum.  Of course,
  -- that's exactly what you're reading right now.
  -->

这就叫以牙还牙:凡是用Resin服务器的网站,都不会出现M$的恼人友好信息了。



版权所有 罗明
posted on 2006-02-13 18:27 罗明 阅读(1013) 评论(0)  编辑  收藏 所属分类: PersonalServer

只有注册用户登录后才能发表评论。


网站导航: