|
Enable strict content type checks for REST and RPC endpoints and enable it by default.
Allowed content types are:
JSON -> application/json, text/x-json, application/javascript, application/x-javascript, text/javascript, text/ecmascript
XML -> application/xml, text/xml
Atom -> application/xml+atom
The default output content type for JSON is switched from application/json to application/javascript to enable more convenient browser tests as application/javascript doesnt automatically trigger a download on many browsers.
application/x-www-form-urlencoded is now strictly forbidden and will result in an BAD_REQUEST. This is necessary to avoid prevent confusion around OAuth body signing. Servlets will automatically decode the body content into parameters if this content type is set and the body content is not available for the API once this happens. If the body was a JSON AppData update for instance it is lost. There is incompatability here whith Shindig PHP which allows the body through in this case and includes it in the OAuth message verification where Java Shindig simply cannot. A forthcoming patch will address the OAuth compatability issue
Containers can control whether they allow unknown content types to pass through the check
Total comments: 4
Total comments: 8
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+384 lines, -132 lines) |
Patch |
|
|
java/common/conf/shindig.properties
|
View
|
1
2
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
|
java/common/src/main/java/org/apache/shindig/protocol/ApiServlet.java
|
View
|
1
2
|
8 chunks |
+100 lines, -5 lines |
2 comments
|
Download
|
|
|
java/common/src/main/java/org/apache/shindig/protocol/DataServiceServlet.java
|
View
|
1
2
|
3 chunks |
+46 lines, -24 lines |
0 comments
|
Download
|
|
|
java/common/src/main/java/org/apache/shindig/protocol/JsonRpcServlet.java
|
View
|
1
2
|
4 chunks |
+26 lines, -20 lines |
0 comments
|
Download
|
|
|
java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanAtomConverter.java
|
View
|
2
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
|
java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanJsonConverter.java
|
View
|
2
|
5 chunks |
+21 lines, -15 lines |
4 comments
|
Download
|
|
|
java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanJsonLibConverter.java
|
View
|
2
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
|
java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanXStreamConverter.java
|
View
|
2
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
|
java/common/src/main/java/org/apache/shindig/protocol/conversion/BeanXmlConverter.java
|
View
|
2
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
|
java/common/src/test/java/org/apache/shindig/protocol/ApiServletTest.java
|
View
|
|
1 chunk |
+87 lines, -0 lines |
0 comments
|
Download
|
|
|
java/common/src/test/java/org/apache/shindig/protocol/DataServiceServletTest.java
|
View
|
1
2
|
6 chunks |
+16 lines, -10 lines |
0 comments
|
Download
|
|
|
java/common/src/test/java/org/apache/shindig/protocol/JsonRpcServletTest.java
|
View
|
1
2
|
4 chunks |
+17 lines, -17 lines |
0 comments
|
Download
|
|
|
java/gadgets/src/main/java/org/apache/shindig/gadgets/render/HtmlRenderer.java
|
View
|
2
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
|
java/gadgets/src/test/java/org/apache/shindig/gadgets/render/HtmlRendererTest.java
|
View
|
2
|
5 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
|
|
java/social-api/src/main/java/org/apache/shindig/social/core/util/BeanXStreamAtomConverter.java
|
View
|
2
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
|
java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/AbstractLargeRestfulTests.java
|
View
|
1
2
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
|
|
java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/RestfulJsonActivityTest.java
|
View
|
2
|
6 chunks |
+12 lines, -6 lines |
0 comments
|
Download
|
|
|
java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/RestfulJsonDataTest.java
|
View
|
2
|
8 chunks |
+19 lines, -9 lines |
0 comments
|
Download
|
|
|
java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/RestfulJsonPeopleTest.java
|
View
|
2
|
5 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
Total messages: 9
|