[ 
https://issues.apache.org/jira/browse/KNOX-663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127514#comment-15127514
 ] 

sangshenghong edited comment on KNOX-663 at 2/2/16 2:59 AM:
------------------------------------------------------------

Hi Kevin:
We do have one custom service . For this issue, if we set MIME type as 
"application/vnd.pmml-xml" instead of plus , it will be ok, but for subtype of  
MIME type, it is ok for using  plus "+" character. So I suspect  it is  Knox 
issue   when  handling mimetype which include "+"   in response. Also I checked 
the  request, it is correct. 


was (Author: sangshenghong):
Hi Kevin:
We do have one custom service . For this issue, if we set MIME type as 
"application/vnd.pmml-xml" instead of plus , it will be ok, but for subtype of  
MIME type, it is ok for using "+" character. So I suspect  it is  Knox issue   
when  handling mimetype which include "+"   in response. Also I checked the  
request, it is correct. 

> javax.activation.MimeTypeParseException: Sub type is invalid.
> -------------------------------------------------------------
>
>                 Key: KNOX-663
>                 URL: https://issues.apache.org/jira/browse/KNOX-663
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 0.6.0
>            Reporter: sangshenghong
>
> We set the MimeType as "application/vnd.pmml+xml", but we got the following 
> exception "
> Caused by: java.lang.IllegalArgumentException: application/vnd.pmml xml
>       at org.apache.hadoop.gateway.util.MimeTypes.create(MimeTypes.java:36)
>       at 
> org.apache.hadoop.gateway.filter.GatewayResponseWrapper.getMimeType(GatewayResponseWrapper.java:50)
>       at 
> org.apache.hadoop.gateway.filter.rewrite.impl.UrlRewriteResponse.streamResponse(UrlRewriteResponse.java:167)
>       at 
> org.apache.hadoop.gateway.filter.GatewayResponseWrapper.streamResponse(GatewayResponseWrapper.java:58)
>       at 
> org.apache.hadoop.gateway.dispatch.AbstractGatewayDispatch.writeResponse(AbstractGatewayDispatch.java:51)
>       at 
> org.apache.hadoop.gateway.dispatch.DefaultDispatch.writeOutboundResponse(DefaultDispatch.java:187)
>       at 
> com.spss.ae.knoxservice.AnalyticServerDispatch.executeRequest(AnalyticServerDispatch.java:131)
>       at 
> org.apache.hadoop.gateway.dispatch.DefaultDispatch.doGet(DefaultDispatch.java:284)
>       at 
> org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter$GetAdapter.doMethod(GatewayDispatchFilter.java:130)
>       at 
> org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter.doFilter(GatewayDispatchFilter.java:102)
>       at 
> org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(AbstractGatewayFilter.java:61)
>       ... 73 more
> Caused by: javax.activation.MimeTypeParseException: Sub type is invalid.
>       at javax.activation.MimeType.parse(MimeType.java:135)
>       at javax.activation.MimeType.<init>(MimeType.java:63)
>       at org.apache.hadoop.gateway.util.MimeTypes.create(MimeTypes.java:31)
>       ... 83 more
> "
> It looks like the knox convert "+“ to space, 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to