You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Vianney Carel (JIRA)" <ji...@apache.org> on 2010/08/04 20:21:19 UTC

[jira] Created: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.

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


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.

-- 
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


[jira] Commented: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.

Posted by "Vianney Carel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895613#action_12895613 ] 

Vianney Carel commented on HTTPCLIENT-974:
------------------------------------------

Hi Oleg,
Sorry to ask you that, but should I close the issue after you set it to
resolved ?


2010/8/4 Oleg Kalnichevski (JIRA) <ji...@apache.org>



> 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
>             Fix For: 4.1 Alpha3
>
>   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


[jira] Updated: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.

Posted by "Vianney Carel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Priority: Trivial  (was: Major)

> 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 list highlight that we should call resetHeaders()  in the Javadoc.

-- 
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


[jira] Commented: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895617#action_12895617 ] 

Oleg Kalnichevski commented on HTTPCLIENT-974:
----------------------------------------------

You are satisfied with the resolution, please go ahead and close the issue. 

By the way, you may want to take a look at the HttpRedirectStrategy in HttpClient 4.1 which should make handling of POST redirects easier.

Oleg 

> 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
>             Fix For: 4.1 Alpha3
>
>   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


[jira] Closed: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.

Posted by "Vianney Carel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vianney Carel closed HTTPCLIENT-974.
------------------------------------


Issue fixed.

> 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
>             Fix For: 4.1 Alpha3
>
>   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


[jira] Resolved: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-974.
------------------------------------------

    Fix Version/s: 4.1 Alpha3
       Resolution: Fixed

Fixed in SVN trunk. Actually, RequestWrapper should have never been a part of the public API

Oleg

> 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
>             Fix For: 4.1 Alpha3
>
>   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


[jira] Commented: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.

Posted by "Vianney Carel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895610#action_12895610 ] 

Vianney Carel commented on HTTPCLIENT-974:
------------------------------------------

Actually, I'm using it to manually handle redirects on HTTP 302, and reposting data in some cases.
This class wouldn't be there, I would have had to do something similar... :-)

> 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
>             Fix For: 4.1 Alpha3
>
>   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


[jira] Updated: (HTTPCLIENT-974) RequestWrapper does not use the headers of the request it wraps.

Posted by "Vianney Carel (JIRA)" <ji...@apache.org>.
     [ 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