You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Chris Nelson (JIRA)" <ji...@apache.org> on 2010/08/17 21:29:47 UTC

[jira] Created: (CAMEL-3059) HTTP Proxy Mulitpart Requests

HTTP Proxy Mulitpart Requests
-----------------------------

                 Key: CAMEL-3059
                 URL: https://issues.apache.org/activemq/browse/CAMEL-3059
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-jetty
    Affects Versions: 2.4.0
            Reporter: Chris Nelson
             Fix For: 2.5.0


I am trying to create an HTTP proxy that will support mulitpart requests. I was hoping I could do something like below, but the attachments do not get sent out. The attachments are parsed by the Jetty MultiPart filter and put into the in message, but they do not get sent out by the HTTP client.

from("jetty:http://xxx?bridgeEndpoint=true").to("http://xxx?bridgeEndpoint=true");

To workaround this problem, I modified the JettyHttpComponent and JettyHttpEndpoint classes to use a new enableMultipartFilter flag. If this is set to false it will not enable the Jetty multipart filter, and thus the entire request will be proxied through. In the case of the bridgeEndpoint it seems like this should be the default, but I wasn't sure what else this might break. I have attached patches against the 2.5.0 codebase for these two classes and a test case that shows how it can be used. In the test case you will notice I have to override the the outbound filter strategy so that it passes the original headers (i.e. content type). Again this seems like something that would be the default for the bridged endpoint.

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


[jira] Resolved: (CAMEL-3059) HTTP Proxy Mulitpart Requests

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-3059.
---------------------------------

    Resolution: Fixed

Applied patch with thanks to Chris.

> HTTP Proxy Mulitpart Requests
> -----------------------------
>
>                 Key: CAMEL-3059
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3059
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.4.0
>            Reporter: Chris Nelson
>            Assignee: Willem Jiang
>             Fix For: 2.5.0
>
>         Attachments: HttpBridgeMultipartRouteTest.java, JettyHttpComponent.patch, JettyHttpEndpoint.patch
>
>
> I am trying to create an HTTP proxy that will support mulitpart requests. I was hoping I could do something like below, but the attachments do not get sent out. The attachments are parsed by the Jetty MultiPart filter and put into the in message, but they do not get sent out by the HTTP client.
> from("jetty:http://xxx?bridgeEndpoint=true").to("http://xxx?bridgeEndpoint=true");
> To workaround this problem, I modified the JettyHttpComponent and JettyHttpEndpoint classes to use a new enableMultipartFilter flag. If this is set to false it will not enable the Jetty multipart filter, and thus the entire request will be proxied through. In the case of the bridgeEndpoint it seems like this should be the default, but I wasn't sure what else this might break. I have attached patches against the 2.5.0 codebase for these two classes and a test case that shows how it can be used. In the test case you will notice I have to override the the outbound filter strategy so that it passes the original headers (i.e. content type). Again this seems like something that would be the default for the bridged endpoint.

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


[jira] Commented: (CAMEL-3059) HTTP Proxy Mulitpart Requests

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61449#action_61449 ] 

Willem Jiang commented on CAMEL-3059:
-------------------------------------

Thanks Claus for doing it.

> HTTP Proxy Mulitpart Requests
> -----------------------------
>
>                 Key: CAMEL-3059
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3059
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.4.0
>            Reporter: Chris Nelson
>            Assignee: Willem Jiang
>             Fix For: 2.5.0
>
>         Attachments: HttpBridgeMultipartRouteTest.java, JettyHttpComponent.patch, JettyHttpEndpoint.patch
>
>
> I am trying to create an HTTP proxy that will support mulitpart requests. I was hoping I could do something like below, but the attachments do not get sent out. The attachments are parsed by the Jetty MultiPart filter and put into the in message, but they do not get sent out by the HTTP client.
> from("jetty:http://xxx?bridgeEndpoint=true").to("http://xxx?bridgeEndpoint=true");
> To workaround this problem, I modified the JettyHttpComponent and JettyHttpEndpoint classes to use a new enableMultipartFilter flag. If this is set to false it will not enable the Jetty multipart filter, and thus the entire request will be proxied through. In the case of the bridgeEndpoint it seems like this should be the default, but I wasn't sure what else this might break. I have attached patches against the 2.5.0 codebase for these two classes and a test case that shows how it can be used. In the test case you will notice I have to override the the outbound filter strategy so that it passes the original headers (i.e. content type). Again this seems like something that would be the default for the bridged endpoint.

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


[jira] Commented: (CAMEL-3059) HTTP Proxy Mulitpart Requests

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61439#action_61439 ] 

Claus Ibsen commented on CAMEL-3059:
------------------------------------

Willem remember to update the wiki documentation of camel-jetty with the new {{enableMultipartFilter}} option

> HTTP Proxy Mulitpart Requests
> -----------------------------
>
>                 Key: CAMEL-3059
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3059
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.4.0
>            Reporter: Chris Nelson
>            Assignee: Willem Jiang
>             Fix For: 2.5.0
>
>         Attachments: HttpBridgeMultipartRouteTest.java, JettyHttpComponent.patch, JettyHttpEndpoint.patch
>
>
> I am trying to create an HTTP proxy that will support mulitpart requests. I was hoping I could do something like below, but the attachments do not get sent out. The attachments are parsed by the Jetty MultiPart filter and put into the in message, but they do not get sent out by the HTTP client.
> from("jetty:http://xxx?bridgeEndpoint=true").to("http://xxx?bridgeEndpoint=true");
> To workaround this problem, I modified the JettyHttpComponent and JettyHttpEndpoint classes to use a new enableMultipartFilter flag. If this is set to false it will not enable the Jetty multipart filter, and thus the entire request will be proxied through. In the case of the bridgeEndpoint it seems like this should be the default, but I wasn't sure what else this might break. I have attached patches against the 2.5.0 codebase for these two classes and a test case that shows how it can be used. In the test case you will notice I have to override the the outbound filter strategy so that it passes the original headers (i.e. content type). Again this seems like something that would be the default for the bridged endpoint.

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


[jira] Commented: (CAMEL-3059) HTTP Proxy Mulitpart Requests

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61445#action_61445 ] 

Claus Ibsen commented on CAMEL-3059:
------------------------------------

I have updated the wiki page

> HTTP Proxy Mulitpart Requests
> -----------------------------
>
>                 Key: CAMEL-3059
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3059
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.4.0
>            Reporter: Chris Nelson
>            Assignee: Willem Jiang
>             Fix For: 2.5.0
>
>         Attachments: HttpBridgeMultipartRouteTest.java, JettyHttpComponent.patch, JettyHttpEndpoint.patch
>
>
> I am trying to create an HTTP proxy that will support mulitpart requests. I was hoping I could do something like below, but the attachments do not get sent out. The attachments are parsed by the Jetty MultiPart filter and put into the in message, but they do not get sent out by the HTTP client.
> from("jetty:http://xxx?bridgeEndpoint=true").to("http://xxx?bridgeEndpoint=true");
> To workaround this problem, I modified the JettyHttpComponent and JettyHttpEndpoint classes to use a new enableMultipartFilter flag. If this is set to false it will not enable the Jetty multipart filter, and thus the entire request will be proxied through. In the case of the bridgeEndpoint it seems like this should be the default, but I wasn't sure what else this might break. I have attached patches against the 2.5.0 codebase for these two classes and a test case that shows how it can be used. In the test case you will notice I have to override the the outbound filter strategy so that it passes the original headers (i.e. content type). Again this seems like something that would be the default for the bridged endpoint.

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


[jira] Assigned: (CAMEL-3059) HTTP Proxy Mulitpart Requests

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-3059:
-----------------------------------

    Assignee: Willem Jiang

> HTTP Proxy Mulitpart Requests
> -----------------------------
>
>                 Key: CAMEL-3059
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3059
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.4.0
>            Reporter: Chris Nelson
>            Assignee: Willem Jiang
>             Fix For: 2.5.0
>
>         Attachments: HttpBridgeMultipartRouteTest.java, JettyHttpComponent.patch, JettyHttpEndpoint.patch
>
>
> I am trying to create an HTTP proxy that will support mulitpart requests. I was hoping I could do something like below, but the attachments do not get sent out. The attachments are parsed by the Jetty MultiPart filter and put into the in message, but they do not get sent out by the HTTP client.
> from("jetty:http://xxx?bridgeEndpoint=true").to("http://xxx?bridgeEndpoint=true");
> To workaround this problem, I modified the JettyHttpComponent and JettyHttpEndpoint classes to use a new enableMultipartFilter flag. If this is set to false it will not enable the Jetty multipart filter, and thus the entire request will be proxied through. In the case of the bridgeEndpoint it seems like this should be the default, but I wasn't sure what else this might break. I have attached patches against the 2.5.0 codebase for these two classes and a test case that shows how it can be used. In the test case you will notice I have to override the the outbound filter strategy so that it passes the original headers (i.e. content type). Again this seems like something that would be the default for the bridged endpoint.

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


[jira] Updated: (CAMEL-3059) HTTP Proxy Mulitpart Requests

Posted by "Chris Nelson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Nelson updated CAMEL-3059:
--------------------------------

    Attachment: JettyHttpComponent.patch
                JettyHttpEndpoint.patch
                HttpBridgeMultipartRouteTest.java

> HTTP Proxy Mulitpart Requests
> -----------------------------
>
>                 Key: CAMEL-3059
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3059
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 2.4.0
>            Reporter: Chris Nelson
>             Fix For: 2.5.0
>
>         Attachments: HttpBridgeMultipartRouteTest.java, JettyHttpComponent.patch, JettyHttpEndpoint.patch
>
>
> I am trying to create an HTTP proxy that will support mulitpart requests. I was hoping I could do something like below, but the attachments do not get sent out. The attachments are parsed by the Jetty MultiPart filter and put into the in message, but they do not get sent out by the HTTP client.
> from("jetty:http://xxx?bridgeEndpoint=true").to("http://xxx?bridgeEndpoint=true");
> To workaround this problem, I modified the JettyHttpComponent and JettyHttpEndpoint classes to use a new enableMultipartFilter flag. If this is set to false it will not enable the Jetty multipart filter, and thus the entire request will be proxied through. In the case of the bridgeEndpoint it seems like this should be the default, but I wasn't sure what else this might break. I have attached patches against the 2.5.0 codebase for these two classes and a test case that shows how it can be used. In the test case you will notice I have to override the the outbound filter strategy so that it passes the original headers (i.e. content type). Again this seems like something that would be the default for the bridged endpoint.

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