You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Li Xu <li...@us.ibm.com> on 2011/06/20 22:26:49 UTC

remove scheme from defaultShindigTestHost in container.js

Hello, all

Can we remove scheme from "defaultShindigTestHost" in container.js? 
eg
"defaultShindigTestHost":"//%authority%",
insteadof 
"defaultShindigTestHost":"http://%authority%",
Right now it's not convenient. Each time we need to modify container.js if 
scheme needs to be updated. 
Another approach I could think of is to replace the scheme based on the 
value from incoming request....

Could anyone please suggest if there's any flaw to remove scheme here? I 
have run a few tests and didn't catch anything bad... 

thanks!
li


Re: remove scheme from defaultShindigTestHost in container.js

Posted by Henry Saputra <he...@gmail.com>.
I propose the change with this review request:

https://reviews.apache.org/r/939/

Would love to get some reviews for this.

- Henry

On Tue, Jun 21, 2011 at 6:02 AM, Li Xu <li...@us.ibm.com> wrote:
> that's okay. thanks for clarifying!
> Does anyone on the mailing list have any objection regarding removing the
> scheme from defaultShindigTestHost?
> Thanks!
> li
>
>
>
> From:
> daviesd <da...@oclc.org>
> To:
> <de...@shindig.apache.org>
> Date:
> 06/20/2011 06:32 PM
> Subject:
> Re: remove scheme from defaultShindigTestHost in container.js
>
>
>
> Oh yes... apologize... I did not see any bad side-effect after removing
> the
> scheme from defaultShindigTestHost.  Only endPoints as you suggested.
>
> doug
>
>
> On 6/20/11 5:55 PM, "Li Xu" <li...@us.ibm.com> wrote:
>
>> Hi, Doug
>> Thanks for the comments.
>> There were two properties.... I have seen the exception only when I
> remove
>> scheme from this property from container.js
>>  "osapi" : {
>>     // The endpoints to query for available JSONRPC/REST services
>>     "endPoints" : [ "//%host%${CONTEXT_ROOT}/rpc" ]
>>   },
>> I agree with you that the java code should be fixed to get scheme from
>> request...will look further.
>>
>> For the other property:
>> "defaultShindigTestHost":"//%authority%",
>>
>> I haven't seen any side effects yet... I'd like to suggest to update
> that
>> property first if there's no known problem.
>>
>> thanks!
>> li
>>
>>
>>
>>
>>
>> From:
>> daviesd <da...@oclc.org>
>> To:
>> <de...@shindig.apache.org>
>> Date:
>> 06/20/2011 05:35 PM
>> Subject:
>> Re: remove scheme from defaultShindigTestHost in container.js
>>
>>
>>
>> If I remove the scheme then the server-side fails during listMethods (it
>> uses the same js value that is used client side).
>>
>> org.apache.shindig.gadgets.render.DefaultServiceFetcher retrieveServices
>> SEVERE: Failed to fetch services methods from endpoint
>> //myshindigserver:8443/shindig/rpc. Error Missing schema for request:
>> //myshindigserver:8443/shindig/rpc?method=system.listMethods
>>
>> I think the java code would need to be changed to tack on the current
>> scheme
>> of the servlet request.
>>
>> doug
>>
>>
>> On 6/20/11 4:26 PM, "Li Xu" <li...@us.ibm.com> wrote:
>>
>>> Hello, all
>>>
>>> Can we remove scheme from "defaultShindigTestHost" in container.js?
>>> eg
>>> "defaultShindigTestHost":"//%authority%",
>>> insteadof
>>> "defaultShindigTestHost":"http://%authority%",
>>> Right now it's not convenient. Each time we need to modify container.js
>> if
>>> scheme needs to be updated.
>>> Another approach I could think of is to replace the scheme based on the
>>> value from incoming request....
>>>
>>> Could anyone please suggest if there's any flaw to remove scheme here?
> I
>>> have run a few tests and didn't catch anything bad...
>>>
>>> thanks!
>>> li
>>>
>>
>>
>>
>>
>
>
>
>
>

Re: remove scheme from defaultShindigTestHost in container.js

Posted by Li Xu <li...@us.ibm.com>.
that's okay. thanks for clarifying!
Does anyone on the mailing list have any objection regarding removing the 
scheme from defaultShindigTestHost? 
Thanks!
li



From:
daviesd <da...@oclc.org>
To:
<de...@shindig.apache.org>
Date:
06/20/2011 06:32 PM
Subject:
Re: remove scheme from defaultShindigTestHost in container.js



Oh yes... apologize... I did not see any bad side-effect after removing 
the
scheme from defaultShindigTestHost.  Only endPoints as you suggested.

doug


On 6/20/11 5:55 PM, "Li Xu" <li...@us.ibm.com> wrote:

> Hi, Doug
> Thanks for the comments.
> There were two properties.... I have seen the exception only when I 
remove
> scheme from this property from container.js
>  "osapi" : {
>     // The endpoints to query for available JSONRPC/REST services
>     "endPoints" : [ "//%host%${CONTEXT_ROOT}/rpc" ]
>   },
> I agree with you that the java code should be fixed to get scheme from
> request...will look further.
> 
> For the other property:
> "defaultShindigTestHost":"//%authority%",
> 
> I haven't seen any side effects yet... I'd like to suggest to update 
that
> property first if there's no known problem.
> 
> thanks!
> li
> 
> 
> 
> 
> 
> From:
> daviesd <da...@oclc.org>
> To:
> <de...@shindig.apache.org>
> Date:
> 06/20/2011 05:35 PM
> Subject:
> Re: remove scheme from defaultShindigTestHost in container.js
> 
> 
> 
> If I remove the scheme then the server-side fails during listMethods (it
> uses the same js value that is used client side).
> 
> org.apache.shindig.gadgets.render.DefaultServiceFetcher retrieveServices
> SEVERE: Failed to fetch services methods from endpoint
> //myshindigserver:8443/shindig/rpc. Error Missing schema for request:
> //myshindigserver:8443/shindig/rpc?method=system.listMethods
> 
> I think the java code would need to be changed to tack on the current
> scheme
> of the servlet request.
> 
> doug
> 
> 
> On 6/20/11 4:26 PM, "Li Xu" <li...@us.ibm.com> wrote:
> 
>> Hello, all
>> 
>> Can we remove scheme from "defaultShindigTestHost" in container.js?
>> eg
>> "defaultShindigTestHost":"//%authority%",
>> insteadof 
>> "defaultShindigTestHost":"http://%authority%",
>> Right now it's not convenient. Each time we need to modify container.js
> if
>> scheme needs to be updated.
>> Another approach I could think of is to replace the scheme based on the
>> value from incoming request....
>> 
>> Could anyone please suggest if there's any flaw to remove scheme here? 
I
>> have run a few tests and didn't catch anything bad...
>> 
>> thanks!
>> li
>> 
> 
> 
> 
> 





Re: remove scheme from defaultShindigTestHost in container.js

Posted by daviesd <da...@oclc.org>.
Oh yes... apologize... I did not see any bad side-effect after removing the
scheme from defaultShindigTestHost.  Only endPoints as you suggested.

doug


On 6/20/11 5:55 PM, "Li Xu" <li...@us.ibm.com> wrote:

> Hi, Doug
> Thanks for the comments.
> There were two properties.... I have seen the exception only when I remove
> scheme from this property from container.js
>  "osapi" : {
>     // The endpoints to query for available JSONRPC/REST services
>     "endPoints" : [ "//%host%${CONTEXT_ROOT}/rpc" ]
>   },
> I agree with you that the java code should be fixed to get scheme from
> request...will look further.
> 
> For the other property:
> "defaultShindigTestHost":"//%authority%",
> 
> I haven't seen any side effects yet... I'd like to suggest to update that
> property first if there's no known problem.
> 
> thanks!
> li
> 
> 
> 
> 
> 
> From:
> daviesd <da...@oclc.org>
> To:
> <de...@shindig.apache.org>
> Date:
> 06/20/2011 05:35 PM
> Subject:
> Re: remove scheme from defaultShindigTestHost in container.js
> 
> 
> 
> If I remove the scheme then the server-side fails during listMethods (it
> uses the same js value that is used client side).
> 
> org.apache.shindig.gadgets.render.DefaultServiceFetcher retrieveServices
> SEVERE: Failed to fetch services methods from endpoint
> //myshindigserver:8443/shindig/rpc. Error Missing schema for request:
> //myshindigserver:8443/shindig/rpc?method=system.listMethods
> 
> I think the java code would need to be changed to tack on the current
> scheme
> of the servlet request.
> 
> doug
> 
> 
> On 6/20/11 4:26 PM, "Li Xu" <li...@us.ibm.com> wrote:
> 
>> Hello, all
>> 
>> Can we remove scheme from "defaultShindigTestHost" in container.js?
>> eg
>> "defaultShindigTestHost":"//%authority%",
>> insteadof 
>> "defaultShindigTestHost":"http://%authority%",
>> Right now it's not convenient. Each time we need to modify container.js
> if
>> scheme needs to be updated.
>> Another approach I could think of is to replace the scheme based on the
>> value from incoming request....
>> 
>> Could anyone please suggest if there's any flaw to remove scheme here? I
>> have run a few tests and didn't catch anything bad...
>> 
>> thanks!
>> li
>> 
> 
> 
> 
> 



Re: remove scheme from defaultShindigTestHost in container.js

Posted by Li Xu <li...@us.ibm.com>.
Hi, Doug
Thanks for the comments. 
There were two properties.... I have seen the exception only when I remove 
scheme from this property from container.js
 "osapi" : {
    // The endpoints to query for available JSONRPC/REST services
    "endPoints" : [ "//%host%${CONTEXT_ROOT}/rpc" ]
  },
I agree with you that the java code should be fixed to get scheme from 
request...will look further.

For the other property:
"defaultShindigTestHost":"//%authority%",

I haven't seen any side effects yet... I'd like to suggest to update that 
property first if there's no known problem.

thanks!
li





From:
daviesd <da...@oclc.org>
To:
<de...@shindig.apache.org>
Date:
06/20/2011 05:35 PM
Subject:
Re: remove scheme from defaultShindigTestHost in container.js



If I remove the scheme then the server-side fails during listMethods (it
uses the same js value that is used client side).

org.apache.shindig.gadgets.render.DefaultServiceFetcher retrieveServices
SEVERE: Failed to fetch services methods from endpoint
//myshindigserver:8443/shindig/rpc. Error Missing schema for request:
//myshindigserver:8443/shindig/rpc?method=system.listMethods

I think the java code would need to be changed to tack on the current 
scheme
of the servlet request.

doug


On 6/20/11 4:26 PM, "Li Xu" <li...@us.ibm.com> wrote:

> Hello, all
> 
> Can we remove scheme from "defaultShindigTestHost" in container.js?
> eg
> "defaultShindigTestHost":"//%authority%",
> insteadof 
> "defaultShindigTestHost":"http://%authority%",
> Right now it's not convenient. Each time we need to modify container.js 
if
> scheme needs to be updated.
> Another approach I could think of is to replace the scheme based on the
> value from incoming request....
> 
> Could anyone please suggest if there's any flaw to remove scheme here? I
> have run a few tests and didn't catch anything bad...
> 
> thanks!
> li
> 





Re: remove scheme from defaultShindigTestHost in container.js

Posted by daviesd <da...@oclc.org>.
If I remove the scheme then the server-side fails during listMethods (it
uses the same js value that is used client side).

org.apache.shindig.gadgets.render.DefaultServiceFetcher retrieveServices
SEVERE: Failed to fetch services methods from endpoint
//myshindigserver:8443/shindig/rpc. Error Missing schema for request:
//myshindigserver:8443/shindig/rpc?method=system.listMethods

I think the java code would need to be changed to tack on the current scheme
of the servlet request.

doug


On 6/20/11 4:26 PM, "Li Xu" <li...@us.ibm.com> wrote:

> Hello, all
> 
> Can we remove scheme from "defaultShindigTestHost" in container.js?
> eg
> "defaultShindigTestHost":"//%authority%",
> insteadof 
> "defaultShindigTestHost":"http://%authority%",
> Right now it's not convenient. Each time we need to modify container.js if
> scheme needs to be updated.
> Another approach I could think of is to replace the scheme based on the
> value from incoming request....
> 
> Could anyone please suggest if there's any flaw to remove scheme here? I
> have run a few tests and didn't catch anything bad...
> 
> thanks!
> li
>