As per the RPC Spec for content upload, shindig needs to support
multipart/form-data handling. This does the required changes to support it.
https://issues.apache.org/jira/browse/SHINDIG-938
Thanks for the review. Please have another look. http://codereview.appspot.com/21069/diff/1/15 File java/common/src/main/java/org/apache/shindig/protocol/JsonRpcServlet.java (right): http://codereview.appspot.com/21069/diff/1/15#newcode94 Line 94: ...
16 years, 11 months ago
(2009-02-26 16:45:18 UTC)
#4
Thanks for the review. Please have another look.
http://codereview.appspot.com/21069/diff/1/15
File java/common/src/main/java/org/apache/shindig/protocol/JsonRpcServlet.java
(right):
http://codereview.appspot.com/21069/diff/1/15#newcode94
Line 94: Map<String, FormDataItem> formItems = new HashMap<String,
FormDataItem>();
On 2009/02/26 06:10:20, louiscryan wrote:
> while the spec doesnt cover it, it may also be worthwhile detecting the first
> content block of application/json and assuming it is the request. The form
field
> named request is only needed when posting out of a browser.
Done.
http://codereview.appspot.com/21069/diff/1/15#newcode246
Line 246: if (!"post".equals(request.getMethod().toLowerCase())) {
On 2009/02/26 06:10:20, louiscryan wrote:
> Http methods are always uppercase
Done.
http://codereview.appspot.com/21069/diff/1/12
File java/common/src/main/java/org/apache/shindig/protocol/RequestItem.java
(right):
http://codereview.appspot.com/21069/diff/1/12#newcode82
Line 82: FormDataItem getFormItem(String partName);
On 2009/02/26 06:10:20, louiscryan wrote:
> name is a little generic. FormMimePart instead?
Done.
http://codereview.appspot.com/21069/diff/1/3
File
java/common/src/test/java/org/apache/shindig/protocol/multipart/DefaultMultipartFormParserTest.java
(right):
http://codereview.appspot.com/21069/diff/1/3#newcode52
Line 52: * Helper class to create the mulitpart/form-data body of he POST
request.
On 2009/02/26 06:10:20, louiscryan wrote:
> ...of the POST...
Done.
http://codereview.appspot.com/21069/diff/1/3#newcode54
Line 54: private static class MultipartFormBuilder {
On 2009/02/26 06:10:20, louiscryan wrote:
> Is there nothing that already allows you to fake this up easily in the commons
> library or elsewhere?
I am not sure. A light search did not get anything.
Issue 21069: Support for multipart/form-data @ JsonRpcServlet
(Closed)
Created 16 years, 11 months ago by Sachin Shenoy
Modified 16 years, 6 months ago
Reviewers: awiner, louiscryan
Base URL: http://svn.apache.org/repos/asf/incubator/shindig/trunk/
Comments: 10