Hi Dushan,
I have tested the patch you provided. Now i cant see URL changing issue.
I have tested this with the same setup that i mentioned earlier. So please
go ahead and apply this to trunk. Then i can change passthrough as the
default
transport for load balancer.Thank you very much for looking this and
fix it.

Thanks.

On Sun, Jun 3, 2012 at 7:53 AM, Dushan Abeyruwan <dus...@wso2.com> wrote:

> Hi
>  Found potential solution for this issue, basically during the request
> POST operation we may have to setup SERVICE_PREFIX  at the ServerWorker in
> Passthrough, (did analysis with HTTP default transport ServerWorker) It
> worked well after applying the patch, please find the modified jar file and
> the patch attached herewith
>
> Passthrough ServerWorker   public void run()
>
>  if (uri.indexOf(cfgCtx.getServicePath()) != -1) {
>             // discard upto servicePath
>             uri = uri.substring(uri.indexOf(cfgCtx.getServicePath()) +
>                     cfgCtx.getServicePath().length());
>             // discard [proxy] service name if any
>             int pos = uri.indexOf("/", 1);
>             if (pos > 0) {
>                 uri = uri.substring(pos);
>             } else {
>                 pos = uri.indexOf("?");
>                 if (pos != -1) {
>                     uri = uri.substring(pos);
>                 } else {
>                     uri = "";
>                 }
>             }
>         } else {
>             // remove any absolute prefix if any
>             int pos = uri.indexOf("://");
>             if (pos != -1) {
>                 uri = uri.substring(pos + 3);
>                 pos = uri.indexOf("/");
>                 if (pos != -1) {
>                     uri = uri.substring(pos + 1);
>                 }
>             }
>         }
>
>         String servicePrefix = oriUri.substring(0, oriUri.indexOf(uri));
>         if (servicePrefix.indexOf("://") == -1) {
>             HttpInetConnection inetConn = (HttpInetConnection)
> request.getConnection();
>             InetAddress localAddr = inetConn.getLocalAddress();
>             if (localAddr != null) {
>                 servicePrefix = (sourceConfiguration.isSsl() ? "https://";
> : "http://";) +
>                         localAddr.getHostAddress() + ":" +
> inetConn.getLocalPort() + servicePrefix;
>              }
>         }
>
>
> On Wed, May 30, 2012 at 11:50 AM, Sanjeewa Malalgoda <sanje...@wso2.com>wrote:
>
>> Hi Azeez,
>> I tried it. But i was unable to observe the same behavior experienced
>> with the passthru transport.
>> URL didn't changed and  didn't load ui saying cannot find the file. I
>>  checked is there any change
>> in host header or selecting application member by debugging and realize
>> that nothing changed.
>>
>> Thanks.
>>
>>
>> On Tue, May 29, 2012 at 7:50 PM, Afkham Azeez <az...@wso2.com> wrote:
>>
>>> If you look at the main.xml in the LB, you will see the following
>>> section:
>>>
>>> <!-- Handling status codes: 301, 302 Redirection -->
>>>         <filter source="$trp:Location" regex=".+">
>>>             <property name="LB_SP_Host" expression="$ctx:SERVICE_PREFIX"
>>>                       pattern="(^http.?://\b)(.*):(\d*)(.*)" group="2"/>
>>>
>>>             <property name="LB_Location_Protocol"
>>> expression="$trp:Location"
>>>                       pattern="(^http.?://\b)(.*):(\d*)(.*)" group="1"/>
>>>             <property name="LB_Location_Host" expression="$trp:Location"
>>>                       pattern="(^http.?://\b)(.*):(\d*)(.*)" group="2"/>
>>>             <property name="LB_Location_Path" expression="$trp:Location"
>>>                       pattern="(^http.?://\b)(.*):(\d*)(.*)" group="4"/>
>>>
>>> The Carbon UI does several redirections. When the new transport is used
>>> somehow this may not be working. Sanjeewa, with the nhttp transport, just
>>> remove the above properties and you should experience the same behavior you
>>> experienced with the passthru transport.
>>>
>>> On Tue, May 29, 2012 at 7:29 PM, Dushan Abeyruwan <dus...@wso2.com>wrote:
>>>
>>>> Hi
>>>>   Yes,Currently I am looking in to this issue,probably will have to dig
>>>> into the code level and may have to find the cause, but i felt there may be
>>>> some issues with URL redirecting, because I had tested simple web app
>>>> hosted in AS and was able do operations without any trouble, only issue
>>>> comes when try to login to the admin services hosted in AS or (there carbon
>>>> products) where seems its redirecting the URL to the original request, will
>>>> update this as I progress   on this
>>>>
>>>> cheers
>>>> Dushan
>>>>
>>>>
>>>> On Tue, May 29, 2012 at 6:44 PM, Sanjeewa Malalgoda 
>>>> <sanje...@wso2.com>wrote:
>>>>
>>>>> Hi,
>>>>> I tested Load Balancer(Latest Build of trunk 2012-05-28) with pass
>>>>> through transport enabled. It works for service requests. Tested with 2
>>>>> application server clusters fronted by Load balancer. But when login ui
>>>>> loads it redirect to application server's https port(9446) and from
>>>>> there onward requests are not going through LB(Directly communicate with
>>>>> back end server). I had discussion with dushan regarding this and he is
>>>>> looking in to this issue now. So i changed LB's default transport as 
>>>>> nhttp.
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> On Fri, May 18, 2012 at 1:34 PM, Sanjeewa Malalgoda <sanje...@wso2.com
>>>>> > wrote:
>>>>>
>>>>>> I have set Passthrough as default transport for LB. But still i'm
>>>>>> waiting to do full test with it since there is starting issue in LB. Will
>>>>>> update the thread once tested completely.
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>> On Fri, May 18, 2012 at 1:28 PM, Dushan Abeyruwan <dus...@wso2.com>wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>   I have already instructed LB team the way to integrate
>>>>>>> Passthrough, I believe they have already completed this
>>>>>>>     FYI : Nirmal,Sanjeewa team please response your status with
>>>>>>> the integration process to this mail
>>>>>>>
>>>>>>> cheers
>>>>>>> Dushan
>>>>>>>
>>>>>>>
>>>>>>> On Fri, May 18, 2012 at 12:41 PM, Dimuthu Leelarathne <
>>>>>>> dimut...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Hi Dushan,
>>>>>>>>
>>>>>>>> Have we done this?
>>>>>>>>
>>>>>>>> thanks,
>>>>>>>> dimuthu
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, May 7, 2012 at 7:56 PM, Dushan Abeyruwan 
>>>>>>>> <dus...@wso2.com>wrote:
>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>>   Ok noted..
>>>>>>>>>
>>>>>>>>> cheers
>>>>>>>>> Dushan
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, May 7, 2012 at 7:54 PM, Afkham Azeez <az...@wso2.com>wrote:
>>>>>>>>>
>>>>>>>>>> Cool. Please add this to the TODO list and work with Damitha et.
>>>>>>>>>> al. to get this integrated into the LB.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, May 7, 2012 at 7:46 PM, Dushan Abeyruwan <dus...@wso2.com
>>>>>>>>>> > wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>   Yes, sorry for the late reply, I had a initial test on
>>>>>>>>>>> Passthrough setup in LB (SLive staging ) and It worked without any
>>>>>>>>>>> anomalies, btw. LB by default does not have
>>>>>>>>>>> all the required dependacies  to enable passthrough, thus we may
>>>>>>>>>>> have to certain configuration on that to achieve this, I be back in 
>>>>>>>>>>> SL (8th
>>>>>>>>>>> May )office tomorrow and if required lets hv chat on this
>>>>>>>>>>>
>>>>>>>>>>> cheers
>>>>>>>>>>> Dushan
>>>>>>>>>>>
>>>>>>>>>>> On Mon, May 7, 2012 at 1:43 PM, Afkham Azeez <az...@wso2.com>wrote:
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Dimuthu
>>>>>>>>>>>> Please make a note of this. It needs to go into production
>>>>>>>>>>>> eventually.
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, May 7, 2012 at 1:35 PM, Hiranya Jayathilaka <
>>>>>>>>>>>> hira...@wso2.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Dushan deployed this in SLive Staging a few months ago.
>>>>>>>>>>>>> Sanjaya and Dushan should know the details.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> Hiranya
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, May 7, 2012 at 12:55 PM, Afkham Azeez 
>>>>>>>>>>>>> <az...@wso2.com>wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> ESB folks,
>>>>>>>>>>>>>> Can we have a response please?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Sat, Apr 28, 2012 at 10:52 AM, Afkham Azeez <
>>>>>>>>>>>>>> az...@wso2.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Folks,
>>>>>>>>>>>>>>> Is the passthru transport stable enough to be integrated
>>>>>>>>>>>>>>> with the LB? Can we make it the default? What needs to be done 
>>>>>>>>>>>>>>> to integrate
>>>>>>>>>>>>>>> & enable it in the LB?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> *Afkham Azeez*
>>>>>>>>>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>>>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>>>>>>>>> * <http://www.apache.org/>**
>>>>>>>>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77
>>>>>>>>>>>>>>> 3320919
>>>>>>>>>>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>>>>>>>>>>> twitter: 
>>>>>>>>>>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>>>>>>>>>>> *
>>>>>>>>>>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>>>>>>>>>>> *
>>>>>>>>>>>>>>> *
>>>>>>>>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> *Afkham Azeez*
>>>>>>>>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>>>>>>>> * <http://www.apache.org/>**
>>>>>>>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77
>>>>>>>>>>>>>> 3320919
>>>>>>>>>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>>>>>>>>>> twitter: 
>>>>>>>>>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>>>>>>>>>> *
>>>>>>>>>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>>>>>>>>>> *
>>>>>>>>>>>>>> *
>>>>>>>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Hiranya Jayathilaka
>>>>>>>>>>>>> Senior Technical Lead;
>>>>>>>>>>>>> WSO2 Inc.;  http://wso2.org
>>>>>>>>>>>>> E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
>>>>>>>>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> *Afkham Azeez*
>>>>>>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>>>>>> * <http://www.apache.org/>**
>>>>>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
>>>>>>>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>>>>>>>> twitter: 
>>>>>>>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>>>>>>>> *
>>>>>>>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>>>>>>>> *
>>>>>>>>>>>> *
>>>>>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Dushan Abeyruwan
>>>>>>>>>>> *Senior Software Engineer*
>>>>>>>>>>> *Integration Technologies Team*
>>>>>>>>>>> *WSO2 Inc. http://wso2.com/*
>>>>>>>>>>> *Mobile:(+94)714408632*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> *Afkham Azeez*
>>>>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>>>> * <http://www.apache.org/>**
>>>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
>>>>>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>>>>>> twitter: 
>>>>>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>>>>>> *
>>>>>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>>>>>> *
>>>>>>>>>> *
>>>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Dushan Abeyruwan
>>>>>>>>> *Senior Software Engineer*
>>>>>>>>> *Integration Technologies Team*
>>>>>>>>> *WSO2 Inc. http://wso2.com/*
>>>>>>>>> *Mobile:(+94)714408632*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Dimuthu Leelarathne
>>>>>>>> Technical Lead
>>>>>>>>
>>>>>>>> WSO2, Inc. (http://wso2.com)
>>>>>>>> email: dimut...@wso2.com
>>>>>>>>
>>>>>>>>
>>>>>>>> Lean . Enterprise . Middleware
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dushan Abeyruwan
>>>>>>> *Senior Software Engineer*
>>>>>>> *Integration Technologies Team*
>>>>>>> *WSO2 Inc. http://wso2.com/*
>>>>>>> *Mobile:(+94)714408632*
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Sanjeewa Malalgoda*
>>>>>> mobile : +94 713068779
>>>>>>  <http://sanjeewamalalgoda.blogspot.com/>blog
>>>>>> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Sanjeewa Malalgoda*
>>>>> mobile : +94 713068779
>>>>>  <http://sanjeewamalalgoda.blogspot.com/>blog
>>>>> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dushan Abeyruwan
>>>> *Senior Software Engineer*
>>>> *Integration Technologies Team*
>>>> *WSO2 Inc. http://wso2.com/*
>>>> *Mobile:(+94)714408632*
>>>>
>>>>
>>>
>>>
>>> --
>>> *Afkham Azeez*
>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>> Member; Apache Software Foundation; http://www.apache.org/
>>> * <http://www.apache.org/>**
>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>> *
>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>> *
>>> *
>>> *Lean . Enterprise . Middleware*
>>>
>>>
>>
>>
>> --
>> *Sanjeewa Malalgoda*
>> mobile : +94 713068779
>>  <http://sanjeewamalalgoda.blogspot.com/>blog
>> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/>
>>
>
>
>
> --
> Dushan Abeyruwan
> *Senior Software Engineer*
> *Integration Technologies Team*
> *WSO2 Inc. http://wso2.com/*
> *Mobile:(+94)714408632*
>
>
>
>
> --
> Dushan Abeyruwan
> *Senior Software Engineer*
> *Integration Technologies Team*
> *WSO2 Inc. http://wso2.com/*
> *Mobile:(+94)714408632*
>
>
>
>
> --
> Dushan Abeyruwan
> *Senior Software Engineer*
> *Integration Technologies Team*
> *WSO2 Inc. http://wso2.com/*
> *Mobile:(+94)714408632*
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Sanjeewa Malalgoda*
mobile : +94 713068779
 <http://sanjeewamalalgoda.blogspot.com/>blog
:http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to