[jira] Created: (CAMEL-254) Support for http request headers for http component

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-254) Support for http request headers for http component

JIRA jira@apache.org
Support for http request headers for http component
---------------------------------------------------

                 Key: CAMEL-254
                 URL: https://issues.apache.org/activemq/browse/CAMEL-254
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-http
            Reporter: Roman Kalukiewicz
         Attachments: http-headers.patch

Now there is no way to set http request headers via camel headers while  response headers are available.
This functionality is required when we want to send SOAP request via http component as there is SOAPAction header required.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-254) Support for http request headers for http component

JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40776 ]

Roman Kalukiewicz commented on CAMEL-254:
-----------------------------------------

Maybe we should exclude some of headers by default like content-length or host? On the other hand maybe it will be required by someone?
Or maybe some flag?

To show the problem there is a code snippet that could lead to a problem:
{code}
from("direct:start").to("http://host:1234/a").to("http://host:1234/b");
{code}

After first http invocation we have {{content-length}} header set and when we execute the second http endpoint this header is propagated and {{/b}} endpoint is fooled by wrong value in {{content-length}} header.

On the other hand maybe it is a feature we shouldn't worry about -- header set, header used..

> Support for http request headers for http component
> ---------------------------------------------------
>
>                 Key: CAMEL-254
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-254
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-http
>            Reporter: Roman Kalukiewicz
>         Attachments: http-headers.patch
>
>
> Now there is no way to set http request headers via camel headers while  response headers are available.
> This functionality is required when we want to send SOAP request via http component as there is SOAPAction header required.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-254) Support for http request headers for http component

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40777 ]

Guillaume Nodet commented on CAMEL-254:
---------------------------------------

We need to worry about that, as basic use case will fail.
There are at least two ways to solve the problem:
  * do not include those http headers in the camel exchange
  * do not use these headers when building the http request

I'm thinking we need to implement the second one, as if we don't, requests will be unusable.
But the first option may be interesting to save bandwith and could be controlled by a flag in the uri maybe.

Also, I suppose the same patch should be applied to the camel-jhc component, which uses asynchronous nio.

> Support for http request headers for http component
> ---------------------------------------------------
>
>                 Key: CAMEL-254
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-254
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-http
>            Reporter: Roman Kalukiewicz
>         Attachments: http-headers.patch
>
>
> Now there is no way to set http request headers via camel headers while  response headers are available.
> This functionality is required when we want to send SOAP request via http component as there is SOAPAction header required.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-254) Support for http request headers for http component

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Roman Kalukiewicz reassigned CAMEL-254:
---------------------------------------

    Assignee: Roman Kalukiewicz

> Support for http request headers for http component
> ---------------------------------------------------
>
>                 Key: CAMEL-254
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-254
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-http
>            Reporter: Roman Kalukiewicz
>            Assignee: Roman Kalukiewicz
>         Attachments: http-headers.patch
>
>
> Now there is no way to set http request headers via camel headers while  response headers are available.
> This functionality is required when we want to send SOAP request via http component as there is SOAPAction header required.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-254) Support for http request headers for http component

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Roman Kalukiewicz resolved CAMEL-254.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0

Patches applied

> Support for http request headers for http component
> ---------------------------------------------------
>
>                 Key: CAMEL-254
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-254
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-http
>            Reporter: Roman Kalukiewicz
>            Assignee: Roman Kalukiewicz
>             Fix For: 1.3.0
>
>         Attachments: http-headers.patch
>
>
> Now there is no way to set http request headers via camel headers while  response headers are available.
> This functionality is required when we want to send SOAP request via http component as there is SOAPAction header required.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-254) Support for http request headers for http component

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41121#action_41121 ]

Roman Kalukiewicz commented on CAMEL-254:
-----------------------------------------

I applied a patch to camel-http and commited it.
I have the same change for camel-jhc, but it is copy/paste code then, as there is no dependency between those two projects.

> Support for http request headers for http component
> ---------------------------------------------------
>
>                 Key: CAMEL-254
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-254
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-http
>            Reporter: Roman Kalukiewicz
>            Assignee: Roman Kalukiewicz
>             Fix For: 1.3.0
>
>         Attachments: http-headers.patch
>
>
> Now there is no way to set http request headers via camel headers while  response headers are available.
> This functionality is required when we want to send SOAP request via http component as there is SOAPAction header required.

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