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

Issue 1811042: Returning same status code as that of the fetched resource (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 6 months ago by gagan.goku
Modified:
15 years, 5 months ago
Reviewers:
shindig.remailer, johnfargo, Kuntal Loya, dev-remailer, anupama.dutta, cool-shindig-committers, zhoresh
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/java/
Visibility:
Public.

Description

Returning the error http status code as that of the fetched resource. Since we want to proxy the resource through, we want the user to see the exact code returned by the server.

Patch Set 1 #

Total comments: 1

Patch Set 2 : fixing tests #

Total comments: 6

Patch Set 3 : addressing comments #

Total comments: 2

Patch Set 4 : addressing comments #

Total comments: 2

Patch Set 5 : addressing comments #

Patch Set 6 : reverting ProxyingContentRewriter #

Total comments: 3

Patch Set 7 : syncing_to_head #

Patch Set 8 : syncing_to_head #

Patch Set 9 : adding_test_for_remap #

Patch Set 10 : adding_test_for_remap #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -52 lines) Patch
M java/common/conf/shindig.properties View 1 chunk +5 lines, -0 lines 0 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java View 7 8 5 chunks +32 lines, -31 lines 0 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/UriUtils.java View 7 8 9 3 chunks +8 lines, -3 lines 1 comment Download
M java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/HtmlAccelServletTest.java View 7 chunks +46 lines, -16 lines 0 comments Download
M java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/UriUtilsTest.java View 7 8 2 chunks +58 lines, -2 lines 0 comments Download

Messages

Total messages: 21
gagan.goku
15 years, 6 months ago (2010-07-12 08:40:25 UTC) #1
Kuntal Loya
http://codereview.appspot.com/1811042/diff/1/2 File servlet/AccelHandler.java (right): http://codereview.appspot.com/1811042/diff/1/2#newcode217 servlet/AccelHandler.java:217: response.sendError(results.getHttpStatusCode(), ERROR_FETCHING_DATA); Shouldn't we retain the error mesg in ...
15 years, 6 months ago (2010-07-12 08:59:11 UTC) #2
gagan.goku
fixing tests
15 years, 6 months ago (2010-07-12 09:27:19 UTC) #3
gagan.goku
On 2010/07/12 09:27:19, gagan.goku wrote: > fixing tests Comment addressed.
15 years, 6 months ago (2010-07-12 09:31:23 UTC) #4
anupama.dutta
http://codereview.appspot.com/1811042/diff/6001/7001 File main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java (right): http://codereview.appspot.com/1811042/diff/6001/7001#newcode89 main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java:89: // In case of errors where we want to ...
15 years, 6 months ago (2010-07-13 14:09:44 UTC) #5
gagan.goku
http://codereview.appspot.com/1811042/diff/6001/7001 File main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java (right): http://codereview.appspot.com/1811042/diff/6001/7001#newcode89 main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java:89: // In case of errors where we want to ...
15 years, 6 months ago (2010-07-13 14:41:12 UTC) #6
gagan.goku
addressing comments
15 years, 6 months ago (2010-07-13 16:12:57 UTC) #7
Kuntal Loya
http://codereview.appspot.com/1811042/diff/16001/17001 File main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java (right): http://codereview.appspot.com/1811042/diff/16001/17001#newcode88 main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java:88: if (errorResponse != null) { if (errorResponse == null) ...
15 years, 6 months ago (2010-07-13 18:47:58 UTC) #8
gagan.goku
addressing comments
15 years, 6 months ago (2010-07-13 18:55:37 UTC) #9
gagan.goku
http://codereview.appspot.com/1811042/diff/16001/17001 File main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java (right): http://codereview.appspot.com/1811042/diff/16001/17001#newcode88 main/java/org/apache/shindig/gadgets/servlet/AccelHandler.java:88: if (errorResponse != null) { On 2010/07/13 18:47:58, kuntal.loya ...
15 years, 6 months ago (2010-07-13 18:55:55 UTC) #10
johnfargo
http://codereview.appspot.com/1811042/diff/23001/24002 File main/java/org/apache/shindig/gadgets/uri/UriUtils.java (left): http://codereview.appspot.com/1811042/diff/23001/24002#oldcode129 main/java/org/apache/shindig/gadgets/uri/UriUtils.java:129: resp.sendError(HttpResponse.SC_BAD_GATEWAY); this remapping is critical for many ppl's production ...
15 years, 6 months ago (2010-07-14 20:44:59 UTC) #11
gagan.goku
addressing comments
15 years, 6 months ago (2010-07-15 05:24:32 UTC) #12
gagan.goku
reverting ProxyingContentRewriter
15 years, 6 months ago (2010-07-15 05:27:09 UTC) #13
gagan.goku
On 2010/07/15 05:27:09, gagan.goku wrote: > reverting ProxyingContentRewriter Comments addressed. And to emphasize how important ...
15 years, 6 months ago (2010-07-15 05:29:40 UTC) #14
gagan.goku
On 2010/07/15 05:29:40, gagan.goku wrote: > On 2010/07/15 05:27:09, gagan.goku wrote: > > reverting ProxyingContentRewriter ...
15 years, 6 months ago (2010-07-15 16:17:58 UTC) #15
anupama.dutta
LGTM. http://codereview.appspot.com/1811042/diff/37001/38001 File common/conf/shindig.properties (right): http://codereview.appspot.com/1811042/diff/37001/38001#newcode145 common/conf/shindig.properties:145: # Remap internal server errors received from the ...
15 years, 5 months ago (2010-07-26 12:16:10 UTC) #16
thi.thu.thuy.vu_sap.com
0612452548 -----Original Message----- From: anupama.dutta@gmail.com [mailto:anupama.dutta@gmail.com] Sent: lundi 26 juillet 2010 14:16 To: gagan.goku@gmail.com; johnfargo@gmail.com; ...
15 years, 5 months ago (2010-07-26 13:29:23 UTC) #17
gagan.goku
On 2010/07/26 12:16:10, anupama.dutta wrote: > LGTM. > > http://codereview.appspot.com/1811042/diff/37001/38001 > File common/conf/shindig.properties (right): > ...
15 years, 5 months ago (2010-07-26 14:38:48 UTC) #18
johnfargo
http://codereview.appspot.com/1811042/diff/37001/38004 File gadgets/src/test/java/org/apache/shindig/gadgets/servlet/HtmlAccelServletTest.java (right): http://codereview.appspot.com/1811042/diff/37001/38004#newcode111 gadgets/src/test/java/org/apache/shindig/gadgets/servlet/HtmlAccelServletTest.java:111: ((FakeCaptureRewriter) rewriter).setContentToRewrite(REWRITE_CONTENT); avoid FakeCaptureRewriter casting by just creating a ...
15 years, 5 months ago (2010-07-26 21:03:44 UTC) #19
johnfargo
LGTM, committing w/ one FYI to those reading. http://codereview.appspot.com/1811042/diff/54001/55005 File java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/UriUtils.java (right): http://codereview.appspot.com/1811042/diff/54001/55005#newcode147 java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/UriUtils.java:147: resp.setStatus(HttpResponse.SC_BAD_GATEWAY); ...
15 years, 5 months ago (2010-07-26 22:03:02 UTC) #20
gagan.goku
15 years, 5 months ago (2010-07-27 05:48:17 UTC) #21
Thanks John.

On Tue, Jul 27, 2010 at 3:33 AM, <johnfargo@gmail.com> wrote:

> LGTM, committing w/ one FYI to those reading.
>
>
> http://codereview.appspot.com/1811042/diff/54001/55005
> File
> java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/UriUtils.java
> (right):
>
> http://codereview.appspot.com/1811042/diff/54001/55005#newcode147
>
> java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/UriUtils.java:147:
> resp.setStatus(HttpResponse.SC_BAD_GATEWAY);
> This is the only potentially controversial change left in this CL, but
> it LGTM. It presumes that the calling context will supply error content
> that exists, if any. This is true for all callers (Accel only for the
> moment).

I think it should be clear to the caller since we clearly express that we
are only copying the headers and status code, not the content.
And since the use case for this function is to copy HttpResponse (which is
the result of fetching a web page) into HttpServletResponse, the user
anyways has to copy over the data if any.


>
> http://codereview.appspot.com/1811042/show
>
Sign in to reply to this message.

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