TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why does this site return status 500 but still work?

4 点作者 theSage大约 9 年前

1 comment

patio11大约 9 年前
RFC 2616: For 5xx error codes, <i>User agents SHOULD display any included entity to the user.</i> If your server serves up HTML on a 500, it should get rendered. This page happens to serve up HTML.<p>Why? Well, the server administrators would have a better idea after investigating than I do.<p>If I were playing the percentages, I&#x27;d guess &quot;a poorly coded WordPress plugin is causing rendering the index page to time out <i>after</i> all content has been sent down the pipe; Apache then terminates the connection with a 500 error and sends down all the content it buffered locally prior to the timeout, which in this case happens to be everything.&quot;<p>Circumstantial evidence: no errors on rendering static resources even though they appear to go through the same server. Other dynamic pages show very long time to first byte but sporadically give HTTP 200s; I&#x27;m assuming that they render completely and return control before Apache times out the PHP.