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

Issue 224074: Convert ConcatProxyServlet to use ConcatUriManager (Closed)

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

Description

Restructures ConcatProxyServlet so that it uses ConcatUriManager to process a request. This CL also dissociates ConcatProxyServlet from its dependency on ProxyHandler as well, favoring direct use of RequestPipeline instead. In doing so, it breaks the need to use RequestWrapper along with its somewhat indirect rendering logic. Instead, all output is handled by a ConcatServletOutputStream instance, either JSON or "direct"/verbatim. One downstream effect in terms of output is that Exception cases and 404s continue to result in 400-responses but also yield invalid JSON. This behavior somewhat existed before but is now consistently held. As well, small tweaks are made to output, in particular start/end markers only being rendered for successful verbatim output. Error output is now marked directly w/ the file causing the error. This CL depends on completion and commit of: http://codereview.appspot.com/217091/show

Patch Set 1 #

Patch Set 2 : API updates. #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -370 lines) Patch
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java View 1 3 chunks +121 lines, -296 lines 10 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/ConcatProxyServletTest.java View 1 11 chunks +89 lines, -74 lines 0 comments Download

Messages

Total messages: 11
johnfargo
15 years, 10 months ago (2010-02-26 22:03:06 UTC) #1
johnfargo
Note: In addition to depending on the other referenced CL, this CL will be updated ...
15 years, 10 months ago (2010-02-27 00:28:33 UTC) #2
johnfargo
API updates.
15 years, 10 months ago (2010-03-02 01:15:40 UTC) #3
Paul Lindner
some simple nits.. otherwise looks good. http://codereview.appspot.com/224074/diff/5/1004 File java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java (right): http://codereview.appspot.com/224074/diff/5/1004#newcode62 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java:62: Any reason to ...
15 years, 10 months ago (2010-03-02 09:36:29 UTC) #4
chirag
http://codereview.appspot.com/224074/diff/5/1004 File java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java (right): http://codereview.appspot.com/224074/diff/5/1004#newcode223 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java:223: write(data.getBytes("UTF8")); Shoudn't the charsetName passed to getBytes be "UTF-8" ...
15 years, 10 months ago (2010-03-03 06:11:41 UTC) #5
zhoresh
http://codereview.appspot.com/224074/diff/5/1004 File java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java (right): http://codereview.appspot.com/224074/diff/5/1004#newcode182 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java:182: println(formatHttpError(resp.getHttpStatusCode(), resp.getResponseAsString(), uri)); ServletOutputStream.println is limited to ascii while ...
15 years, 10 months ago (2010-03-03 17:02:05 UTC) #6
zhoresh
http://codereview.appspot.com/224074/diff/5/1004 File java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java (right): http://codereview.appspot.com/224074/diff/5/1004#newcode184 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java:184: outputJs(uri, resp.getResponseAsString()); On 2010/03/03 17:02:05, zhoresh wrote: > Why ...
15 years, 10 months ago (2010-03-03 17:50:47 UTC) #7
johnfargo
On Tue, Mar 2, 2010 at 1:36 AM, <lindner@inuus.com> wrote: > some simple nits.. > ...
15 years, 10 months ago (2010-03-03 19:13:59 UTC) #8
johnfargo
This one's weird. According to http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.htmland other docs, UTF8 is the canonical string reference for ...
15 years, 10 months ago (2010-03-03 19:18:12 UTC) #9
johnfargo
@write vs. println, where is it noted that println doesn't support anything but ASCII? @UTF8, ...
15 years, 10 months ago (2010-03-03 19:22:32 UTC) #10
johnfargo
15 years, 10 months ago (2010-03-03 19:42:00 UTC) #11
NM, found the reference, good catch! Fixed and submitted.

On Wed, Mar 3, 2010 at 11:22 AM, John Hjelmstad <johnfargo@gmail.com> wrote:

> @write vs. println, where is it noted that println doesn't support anything
> but ASCII?
>
> @UTF8, that's the idea here. I've added a comment.
>
>
> On Wed, Mar 3, 2010 at 9:50 AM, <zhoresh@gmail.com> wrote:
>
>>
>> http://codereview.appspot.com/224074/diff/5/1004
>> File
>>
>>
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java
>> (right):
>>
>> http://codereview.appspot.com/224074/diff/5/1004#newcode184
>>
>>
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java:184:
>> outputJs(uri, resp.getResponseAsString());
>> On 2010/03/03 17:02:05, zhoresh wrote:
>>
>>> Why convert to string here, the original code in proxy handler used
>>>
>> IOUtil to
>>
>>> copy bytes for the regular case (faster)
>>>
>>
>> Second thought I think I understand why - if the different resources has
>> different encoding, the conversion to string and back will make them all
>> utf-8.
>> Maybe just put a comment here that explain this.
>>
>>
>> http://codereview.appspot.com/224074/show
>>
>
>
Sign in to reply to this message.

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