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

Issue 1841045: Removing charset information from meta http-equiv content type (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 6 months ago by gagan.goku
Modified:
15 years, 4 months ago
Reviewers:
Paul Lindner, shindig.remailer, dev-remailer, Jasvir Nagra, zhoresh
CC:
cool-shindig-committers_googlegroups.com, vikaas.arora
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk
Visibility:
Public.

Description

Adding a rewriter that removes charset information from meta http-equiv content type tag in html. An html document can specify its charset encoding in the html itself which is used by the browsers in case of ambiguity, like when Content-Type http response header does not specify encoding. This rewriter removes the charset parameter so the browser cannot get confused. This would be useful as we make sure that we return the page with correct encoding (almost always the page will be parsed and serialized in UTF-8 encoding). Links with more information about Content type header: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 Media types: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7

Patch Set 1 #

Total comments: 6

Patch Set 2 : addressing_vikas_comments_by_adding_unit_test #

Patch Set 3 : svn_up #

Patch Set 4 : 'svn_up_and_fixing_one_comment' #

Patch Set 5 : 'svn_up_and_fixing_one_comment' #

Patch Set 6 : 'svn_up' #

Total comments: 2

Patch Set 7 : 'adding_more_test_cases' #

Total comments: 2

Patch Set 8 : 'addressing_zivs_comments' #

Patch Set 9 : 'syncing_to_head' #

Messages

Total messages: 17
gagan.goku
15 years, 6 months ago (2010-07-21 20:40:08 UTC) #1
vikaas.arora
http://codereview.appspot.com/1841045/diff/1/4 File java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverVisitor.java (right): http://codereview.appspot.com/1841045/diff/1/4#newcode44 java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverVisitor.java:44: "content-type".equalsIgnoreCase(httpEquip)) { Make this "content-type" also a constant (final ...
15 years, 6 months ago (2010-07-22 05:22:30 UTC) #2
gagan.goku
http://codereview.appspot.com/1841045/diff/1/4 File java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverVisitor.java (right): http://codereview.appspot.com/1841045/diff/1/4#newcode44 java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverVisitor.java:44: "content-type".equalsIgnoreCase(httpEquip)) { On 2010/07/22 05:22:30, vikaas.arora wrote: > Make ...
15 years, 6 months ago (2010-07-23 02:21:53 UTC) #3
vikaas.arora
lgtm Also just add in description, as to why are we removing media-type from content-type. ...
15 years, 6 months ago (2010-07-23 03:40:45 UTC) #4
gagan.goku
Thanks for the review Vikas. Content type is the header and charset is the parameter. ...
15 years, 6 months ago (2010-07-23 10:55:09 UTC) #5
zhoresh
lgtm, please just add few more tests, thanks http://codereview.appspot.com/1841045/diff/26001/27001 File java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java (right): http://codereview.appspot.com/1841045/diff/26001/27001#newcode45 java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java:45: public ...
15 years, 5 months ago (2010-08-25 17:52:16 UTC) #6
gagan.goku
http://codereview.appspot.com/1841045/diff/26001/27001 File java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java (right): http://codereview.appspot.com/1841045/diff/26001/27001#newcode45 java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java:45: public void testContentTypeCharsetRemoved() throws Exception { On 2010/08/25 17:52:16, ...
15 years, 5 months ago (2010-08-26 01:00:06 UTC) #7
zhoresh
Thanks, but didn't you just caught an issue? http://codereview.appspot.com/1841045/diff/34001/24002 File java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java (right): http://codereview.appspot.com/1841045/diff/34001/24002#newcode114 java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java:114: + ...
15 years, 4 months ago (2010-08-26 22:29:45 UTC) #8
gagan.goku
http://codereview.appspot.com/1841045/diff/34001/24002 File java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java (right): http://codereview.appspot.com/1841045/diff/34001/24002#newcode114 java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ContentTypeCharsetRemoverRewriterTest.java:114: + "<META Content=\"text/html ; charsett=\'hello\'; hello=world\" " On 2010/08/26 ...
15 years, 4 months ago (2010-08-27 02:27:59 UTC) #9
zhoresh
On Thu, Aug 26, 2010 at 7:27 PM, <gagan.goku@gmail.com> wrote: > > http://codereview.appspot.com/1841045/diff/34001/24002 > File ...
15 years, 4 months ago (2010-08-31 16:06:38 UTC) #10
Jasvir Nagra
On Tue, Aug 31, 2010 at 9:06 AM, Ziv Horesh <zhoresh@gmail.com> wrote: > On Thu, ...
15 years, 4 months ago (2010-08-31 17:09:18 UTC) #11
gagan.goku
Tested by putting the following content-type response header in a gbk encoded website and removing ...
15 years, 4 months ago (2010-09-01 01:34:43 UTC) #12
Jasvir Nagra
LGTM On Tue, Aug 31, 2010 at 6:34 PM, Gagandeep singh <gagan.goku@gmail.com>wrote: > Tested by ...
15 years, 4 months ago (2010-09-01 01:56:40 UTC) #13
Jasvir Nagra
LGTM On Tue, Aug 31, 2010 at 6:34 PM, Gagandeep singh <gagan.goku@gmail.com>wrote: > Tested by ...
15 years, 4 months ago (2010-09-01 02:02:36 UTC) #14
gagan.goku
Synced to head so committers don't get any merge failures. I'm so considerate, aren't i ...
15 years, 4 months ago (2010-09-01 02:12:09 UTC) #15
Paul Lindner
thanks! submited On 2010/09/01 02:12:09, gagan.goku wrote: > Synced to head so committers don't get ...
15 years, 4 months ago (2010-09-01 06:59:01 UTC) #16
gagan.goku
15 years, 4 months ago (2010-09-01 07:51:04 UTC) #17
Thanks lots Paul :)

On Wed, Sep 1, 2010 at 12:29 PM, <lindner@inuus.com> wrote:

> thanks!
>
> submited
>
> On 2010/09/01 02:12:09, gagan.goku wrote:
>
>> Synced to head so committers don't get any merge failures. I'm so
>>
> considerate,
>
>> aren't i ?
>>
>
>
>
> http://codereview.appspot.com/1841045/
>
Sign in to reply to this message.

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