[JBoss JIRA] (GTNWSRP-346) Multipart requests are not handeled if there is no attached file
by Chris Laprun (JIRA)
[ https://issues.jboss.org/browse/GTNWSRP-346?page=com.atlassian.jira.plugi... ]
Chris Laprun updated GTNWSRP-346:
---------------------------------
Affects Version/s: 2.2.2.Final
> Multipart requests are not handeled if there is no attached file
> ----------------------------------------------------------------
>
> Key: GTNWSRP-346
> URL: https://issues.jboss.org/browse/GTNWSRP-346
> Project: GateIn WSRP
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.1.7-GA, 2.2.2.Final
> Reporter: Martin Weiler
> Assignee: Chris Laprun
>
> We have html multipart form in a wsrp portlet:
> {code:xml}
> <form enctype="multipart/form-data" method="post" ...
> {code}
> with an optional input field for an attachment:
> {code:xml}
> <input type="file" value="org.springframework.web.multipart.commons.CommonsMultipartFile@f3af1" name="attachement">
> {code}
> The "org.gatein.wsrp.consumer.handlers.ActionHandler" handles the request correctly and tries to create a UploadContext with the help of the WSRPTypeFactory:
> {code}
> UploadContext uploadContext = WSRPTypeFactory.createUploadContext(contentType, baos.toByteArray());
> {code}
> The problem is, that the createUploadContext throws an exception if the byte array has a content lenght of 0 and so the rest of the parameteres are not handled correctly:
> {code}
> public static UploadContext createUploadContext(String mimeType, byte[] uploadData)
> {
> ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mimeType, "MIME Type", "UploadContext");
> if (uploadData == null || uploadData.length == 0)
> {
> throw new IllegalArgumentException("Must pass non-null, non-empty upload data");
> }
>
> UploadContext uploadContext = new UploadContext();
> uploadContext.setMimeType(mimeType);
> uploadContext.setUploadData(uploadData);
> return uploadContext;
> }
> {code}
> So currently the post request with WSRP works only if really a file is attached. Without WSRP it runs with and without an attached file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (GTNWSRP-346) Multipart requests are not handeled if there is no attached file
by Chris Laprun (JIRA)
[ https://issues.jboss.org/browse/GTNWSRP-346?page=com.atlassian.jira.plugi... ]
Chris Laprun updated GTNWSRP-346:
---------------------------------
Fix Version/s: 2.1.8-GA
2.2.3.Final
> Multipart requests are not handeled if there is no attached file
> ----------------------------------------------------------------
>
> Key: GTNWSRP-346
> URL: https://issues.jboss.org/browse/GTNWSRP-346
> Project: GateIn WSRP
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.1.7-GA, 2.2.2.Final
> Reporter: Martin Weiler
> Assignee: Chris Laprun
> Fix For: 2.1.8-GA, 2.2.3.Final
>
>
> We have html multipart form in a wsrp portlet:
> {code:xml}
> <form enctype="multipart/form-data" method="post" ...
> {code}
> with an optional input field for an attachment:
> {code:xml}
> <input type="file" value="org.springframework.web.multipart.commons.CommonsMultipartFile@f3af1" name="attachement">
> {code}
> The "org.gatein.wsrp.consumer.handlers.ActionHandler" handles the request correctly and tries to create a UploadContext with the help of the WSRPTypeFactory:
> {code}
> UploadContext uploadContext = WSRPTypeFactory.createUploadContext(contentType, baos.toByteArray());
> {code}
> The problem is, that the createUploadContext throws an exception if the byte array has a content lenght of 0 and so the rest of the parameteres are not handled correctly:
> {code}
> public static UploadContext createUploadContext(String mimeType, byte[] uploadData)
> {
> ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mimeType, "MIME Type", "UploadContext");
> if (uploadData == null || uploadData.length == 0)
> {
> throw new IllegalArgumentException("Must pass non-null, non-empty upload data");
> }
>
> UploadContext uploadContext = new UploadContext();
> uploadContext.setMimeType(mimeType);
> uploadContext.setUploadData(uploadData);
> return uploadContext;
> }
> {code}
> So currently the post request with WSRP works only if really a file is attached. Without WSRP it runs with and without an attached file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (GTNWSRP-346) Multipart requests are not handeled if there is no attached file
by Martin Weiler (JIRA)
Martin Weiler created GTNWSRP-346:
-------------------------------------
Summary: Multipart requests are not handeled if there is no attached file
Key: GTNWSRP-346
URL: https://issues.jboss.org/browse/GTNWSRP-346
Project: GateIn WSRP
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.1.7-GA
Reporter: Martin Weiler
Assignee: Chris Laprun
We have html multipart form in a wsrp portlet:
{code:xml}
<form enctype="multipart/form-data" method="post" ...
{code}
with an optional input field for an attachment:
{code:xml}
<input type="file" value="org.springframework.web.multipart.commons.CommonsMultipartFile@f3af1" name="attachement">
{code}
The "org.gatein.wsrp.consumer.handlers.ActionHandler" handles the request correctly and tries to create a UploadContext with the help of the WSRPTypeFactory:
{code}
UploadContext uploadContext = WSRPTypeFactory.createUploadContext(contentType, baos.toByteArray());
{code}
The problem is, that the createUploadContext throws an exception if the byte array has a content lenght of 0 and so the rest of the parameteres are not handled correctly:
{code}
public static UploadContext createUploadContext(String mimeType, byte[] uploadData)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mimeType, "MIME Type", "UploadContext");
if (uploadData == null || uploadData.length == 0)
{
throw new IllegalArgumentException("Must pass non-null, non-empty upload data");
}
UploadContext uploadContext = new UploadContext();
uploadContext.setMimeType(mimeType);
uploadContext.setUploadData(uploadData);
return uploadContext;
}
{code}
So currently the post request with WSRP works only if really a file is attached. Without WSRP it runs with and without an attached file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (GTNPORTAL-2765) Update the Login page to work across mobile devices
by Matt Wringe (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2765?page=com.atlassian.jira.pl... ]
Matt Wringe commented on GTNPORTAL-2765:
----------------------------------------
The html looks much better, but the css seems way more complex than it needs to be (I think you can remove the browser specific parts). The goal should be to keep things as simple as possible.
It switches to 'mobile' mode way to quickly, and the svg doesn't look right in different browsers (please try testing in at least 2 browsers: firefox and chrome. More if you have them installed). Also, I am not sure how well this will work in IE (especially newer versions), have you tested that?
> Update the Login page to work across mobile devices
> ---------------------------------------------------
>
> Key: GTNPORTAL-2765
> URL: https://issues.jboss.org/browse/GTNPORTAL-2765
> Project: GateIn Portal
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: Mobile
> Reporter: Matt Wringe
> Assignee: Viliam Rockai
> Attachments: login.zip
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months