[ 
https://issues.apache.org/jira/browse/ASYNCWEB-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569026#action_12569026
 ] 

Sangjin Lee commented on ASYNCWEB-4:
------------------------------------

It appears that the asyncweb common codec is handling this more or less 
correctly, but I haven't looked at it very carefully.

One thing I'm not sure of is how asyncweb handles redirects.  Part of the fix 
was to clear out any existing content or queries (if the same request object is 
reused).  Not sure if the asyncweb client is reusing the same request object 
when redirected.

Another interesting I noticed in DefaultHttpRequest.normalize() is that the 
cookie handling doesn't seem to be correct.  Why is it generating the 
Set-Cookie headers instead of the Cookie header?

> caller supplied content is ignored, and some request headers may be added 
> twice
> -------------------------------------------------------------------------------
>
>                 Key: ASYNCWEB-4
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-4
>             Project: Asyncweb
>          Issue Type: Bug
>            Reporter: Sangjin Lee
>            Assignee: Sangjin Lee
>         Attachments: ASYNCWEB-4.patch, GERONIMO-3839-v2.patch, 
> GERONIMO-3839.patch
>
>
> Some request headers get special treatment by HttpRequestEncoder.  
> HttpRequestEncoder does not make any effort in checking to see if they are 
> present in the headers already.  As a result, they may be added twice if one 
> is not careful.  For example,
> - Content-Type & Content-Length are added by HttpRequestEncoder for POST 
> requests, and should not be added by callers.
> - Host & User-Agent are always added by HttpRequestEncoder, and should not be 
> added by callers as ordinary headers.
> Although one could argue that callers should not add these headers by hand, I 
> think HttpRequestEncoder still should ensure that they are not added twice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to