Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(23)

Issue 1888045: Update "Date" header correctly

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 7 months ago by zhoresh
Modified:
15 years, 7 months ago
Reviewers:
johnfargo, dev-remailer
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk
Visibility:
Public.

Description

HttpResponse headers are multi-map, so we need to replace previous Date header when it is updated. Also I changed the response to use TimeSource so it can be tested easier with less chance of random failure.

Patch Set 1 #

Total comments: 1

Patch Set 2 : Update to use HttpUtil time source (good catch John) #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -20 lines) Patch
java/common/src/main/java/org/apache/shindig/common/servlet/HttpUtil.java View 4 chunks +7 lines, -3 lines 0 comments Download
java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java View 1 6 chunks +10 lines, -3 lines 1 comment Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/http/HttpResponseTest.java View 12 chunks +25 lines, -14 lines 0 comments Download

Messages

Total messages: 5
zhoresh
15 years, 7 months ago (2010-08-04 18:02:48 UTC) #1
johnfargo
http://codereview.appspot.com/1888045/diff/1/3 File java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java (right): http://codereview.appspot.com/1888045/diff/1/3#newcode157 java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java:157: } We might want to set, and then use, ...
15 years, 7 months ago (2010-08-04 20:23:02 UTC) #2
zhoresh
Update to use HttpUtil time source (good catch John)
15 years, 7 months ago (2010-08-04 21:54:08 UTC) #3
johnfargo
LGTM http://codereview.appspot.com/1888045/diff/6001/7003 File java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java (right): http://codereview.appspot.com/1888045/diff/6001/7003#newcode368 java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java:368: return expiration - HttpUtil.getTimeSource().currentTimeMillis(); feel free to introduce ...
15 years, 7 months ago (2010-08-04 22:03:42 UTC) #4
zhoresh
15 years, 7 months ago (2010-08-04 22:10:33 UTC) #5
On 2010/08/04 22:03:42, johnfargo wrote:
> LGTM
> 
> http://codereview.appspot.com/1888045/diff/6001/7003
> File
> java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java
> (right):
> 
> http://codereview.appspot.com/1888045/diff/6001/7003#newcode368
>
java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java:368:
> return expiration - HttpUtil.getTimeSource().currentTimeMillis();
> feel free to introduce your own getter in this class, which just delegates to
> HttpUtil, for encapsulation purposes.

Done, and committed.
Thanks!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b