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

Issue 217102: Handle BOM Entity in gadget spec

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

Description

Some services put BOM entity (actual string '' not just the bytes) as first item on XML stream. For example try: http://www.google.com/ig/modules/china/ijoke.xml I am not sure how correct is that behavior, but most browsers support it by ignoring it (FireFox, IE, Chrome). Attached change handle that special case by ignoring bom entity when parsing gadget spec.

Patch Set 1 #

Patch Set 2 : Add test for BOM char #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -6 lines) Patch
java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGadgetSpecFactory.java View 1 3 chunks +9 lines, -5 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/DefaultGadgetSpecFactoryTest.java View 1 2 chunks +24 lines, -1 line 0 comments Download

Messages

Total messages: 6
zhoresh
15 years, 11 months ago (2010-02-23 19:02:21 UTC) #1
johnfargo
This code looks fine. Have you tried w/ the actual BOM bytes as well? We ...
15 years, 11 months ago (2010-02-23 20:35:22 UTC) #2
zhoresh
The actual BOM char is being trimmed by HttpResponse.getResponseAsString function. We can also trim the ...
15 years, 11 months ago (2010-02-24 18:07:20 UTC) #3
zhoresh
### Eclipse Workspace Patch 1.0 #P shindig-project Index: java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGadgetSpecFactory.java =================================================================== --- java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGadgetSpecFactory.java (revision 915473) +++ ...
15 years, 11 months ago (2010-02-24 18:15:57 UTC) #4
zhoresh
Add test for BOM char
15 years, 11 months ago (2010-02-24 23:49:37 UTC) #5
johnfargo
15 years, 10 months ago (2010-03-10 23:00:41 UTC) #6
LGTM, committed.
Sign in to reply to this message.

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