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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Passenger date header was incorrectly formatted as week-based year

9 点作者 5vforest超过 11 年前

3 条评论

FooBarWidget超过 11 年前
I&#x27;m a developer at Phusion.<p>Thanks everyone for letting us know. We&#x27;re working on rolling out a new release right now. A new gem, tarball and binaries are coming up.<p>In the mean time, you can work around this problem by setting a Date header from your application. For example in Rails you can do:<p><pre><code> before_filter { response.date = Time.now.utc }</code></pre>
5vforest超过 11 年前
&gt; Passenger sometimes gets the date wrong when appending the http Date header to responses. This happens when the week-based year differs from the calendar year. It happens because it uses %G to print the year when it should be using %Y (see this commit: 15ed1d4).<p>Took me a few hours to track this down -- and it&#x27;s probably affecting a large majority of the Rails apps that are using a Passenger server.<p>Hopefully getting the word out can save some folks a few hours of banging their heads on their desks.
edavis超过 11 年前
Anybody know why %G was used instead of %Y?
评论 #6987021 未加载