Proxy WSO2ESB简单直通代理不转发url扩展

Proxy WSO2ESB简单直通代理不转发url扩展,proxy,wso2,wso2esb,Proxy,Wso2,Wso2esb,我实现了一个简单的直通代理,即当我调用 "http://wso2esb:9443/services/proxy" 它应将请求转发给 "http://destinationserver:80/" . 问题是转发时没有携带url扩展名。。i、 e when i do a HTTP POST in http://wso2esb:9443/services/proxy/path1/path2 the request is forwarded t

我实现了一个简单的直通代理,即当我调用

   "http://wso2esb:9443/services/proxy"  
它应将请求转发给

 "http://destinationserver:80/" . 
问题是转发时没有携带url扩展名。。i、 e

  when i do a HTTP POST in       

       http://wso2esb:9443/services/proxy/path1/path2 

  the request is forwarded to 

       http://destinationserver:80 

  rather than to  

        http://destinationserver:80/path1/path2. 

  but HTTP GET behaves as expected. Could anyone  help in where i am going wrong?
My Proxy.xml

  <proxy xmlns="http://ws.apache.org/ns/synapse" name="proxy" transports="https,http"
   statistics="disable" trace="disable" startOnLoad="true">
   <target>
     <outSequence>
         <send/>
     </outSequence>
     <endpoint>
         <address uri="http://destinationserver:80/"/>
     </endpoint>
  </target>
  <description/>
</proxy>

提前谢谢


附言:我的WSO2ESB版本:4.8.1

如果您真的需要它,实现您的目标的一种方法(不确定这是最好的)是:

<proxy xmlns="http://ws.apache.org/ns/synapse" name="proxy" transports="https,http"
   statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <header name="To"
                 expression="concat('http://destinationserver:80',substring-after(syn:get-property('To'),'/services/proxy'))"/>
         <send/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>


http://wso2esb:8280/services/proxy/path1/path2
并应转发至
http://destinationserver:80/path1/path2

事情按照Jeans的回答进行,但Htttp HEAD请求不会被转发,除非它返回400个错误请求。在目标服务器上使用直接链接进行测试将返回预期响应。

谢谢。它起作用了。。但我还是想知道为什么在简单的传递代理上post和get的行为会有所不同。你应该把它作为一个注释而不是答案添加进来。您也可以在WSO2 dev@邮件列表中询问这个问题。