hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vianney Carel (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.
Date Wed, 04 Aug 2010 18:23:19 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vianney Carel updated HTTPCLIENT-974:
-------------------------------------

    Description: 
The RequestWrapper does not use the headers of the request it wraps. Therefore the wrapper
appears as having no header, while the wrapped request may have some.

To work-around that behavior, I have to call resetHeaders() on the wrapper just after having
created it.
This method does the following:
    public void resetHeaders()
    {
        headergroup.clear();
        setHeaders(original.getAllHeaders());
    }

I suggest calling setHeaders directly in the constructor. Or at least highlight in the Javadoc
that we should call resetHeaders().

  was:
The RequestWrapper does not use the headers of the request it wraps. Therefore the wrapper
appears as having no header, while the wrapped request may have some.

To work-around that behavior, I have to call resetHeaders() on the wrapper just after having
created it.
This method does the following:
    public void resetHeaders()
    {
        headergroup.clear();
        setHeaders(original.getAllHeaders());
    }

I suggest calling setHeaders directly in the constructor. Or at list highlight that we should
call resetHeaders()  in the Javadoc.


> RequestWrapper does not use the headers of the request it wraps.
> ----------------------------------------------------------------
>
>                 Key: HTTPCLIENT-974
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-974
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.0.1
>            Reporter: Vianney Carel
>            Priority: Trivial
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The RequestWrapper does not use the headers of the request it wraps. Therefore the wrapper
appears as having no header, while the wrapped request may have some.
> To work-around that behavior, I have to call resetHeaders() on the wrapper just after
having created it.
> This method does the following:
>     public void resetHeaders()
>     {
>         headergroup.clear();
>         setHeaders(original.getAllHeaders());
>     }
> I suggest calling setHeaders directly in the constructor. Or at least highlight in the
Javadoc that we should call resetHeaders().

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message