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

Jeffrey E  Rodriguez commented on KNOX-931:
-------------------------------------------

Seems to me that we are suggesting to special case UrlRewriteRequest so we 
don't urlEncode the input stream for content type 
:"application/x-www-form-urlencoded". 

The purpose of "application/x-www-form-urlencoded" if for type content for 
forms (another alternative is 'multipart/form-data'

Sarah, are you rewriting a form?

Seems to me that we want to fix a wrong case.

I agree with Larry Mccay,  the propose solution to use instanceof for rewrite 
requests is  a bad code smell. (even if there is existing code with instanceof 
:-) ... adding more bad is not usually better). Usually that may mean to 
rethink the solution.

It is also a good idea when sending a patch for code, not just xml rewrite, to 
add java unit test cases. That is usually the best way to make your point that 
something is not working and that your fixes change the Jira. 

 

> asType will not work for body filter when using IdentityAsserterFilter
> ----------------------------------------------------------------------
>
>                 Key: KNOX-931
>                 URL: https://issues.apache.org/jira/browse/KNOX-931
>             Project: Apache Knox
>          Issue Type: Bug
>    Affects Versions: 0.11.0
>            Reporter: Shi Wang
>            Assignee: Shi Wang
>             Fix For: 0.13.0
>
>         Attachments: 
> 0001-KNOX-931-asType-will-not-work-for-body-filter-when-u.patch
>
>
> In IdentityAsserterHttpServletsWrapper.java, method getInputStream(),
> The body will always be urlEncoded if the contentType is 
> "application/x-www-form-urlencoded"
> And self defined filter that change "application/x-www-form-urlencoded" as 
> other contentType for requestbody will be invalid.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to