Dev - ampersand encoding in urlEncodeArgs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Dev - ampersand encoding in urlEncodeArgs

byersa
Will someone check my thinking before I put this in JIRA. I was playing
around with HttpClient and it makes a call to UtilHttp.urlEncodeArgs to
escape the parameter string. At line 462 is:

                        if (buf.length() > 0) buf.append("&");

I believe it should be just "&" for url parameters, right? The scary
thing is that I am not all that sure that I didn't put it there.

-Al
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - ampersand encoding in urlEncodeArgs

Daniel Kunkel
Hi Al

You are absolutely right...  

David should get a chance to check in my usps rate estimation fix soon
which had the same problem.

Daniel


On Wed, 2006-01-18 at 22:02 -0700, Al Byers wrote:

> Will someone check my thinking before I put this in JIRA. I was playing
> around with HttpClient and it makes a call to UtilHttp.urlEncodeArgs to
> escape the parameter string. At line 462 is:
>
>                         if (buf.length() > 0) buf.append("&");
>
> I believe it should be just "&" for url parameters, right? The scary
> thing is that I am not all that sure that I didn't put it there.
>
> -Al
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - ampersand encoding in urlEncodeArgs

David E. Jones

Hopefully I'll get to the rest o the USPS stuff in the near future...  
but this is one that since you mentioned it Daniel I wanted to get  
pushed through...

I made a small change to the urlEncodeArgs method called  
useExpandedEntites to make the expanded entities optional, defaults  
to true. For right now the only difference is in the & if true  
and & alone if false.

The changes to HttpClient and UtilHttp are now in SVN, rev 6532.

-David


On Jan 18, 2006, at 10:23 PM, Daniel Kunkel wrote:

> Hi Al
>
> You are absolutely right...
>
> David should get a chance to check in my usps rate estimation fix soon
> which had the same problem.
>
> Daniel
>
>
> On Wed, 2006-01-18 at 22:02 -0700, Al Byers wrote:
>> Will someone check my thinking before I put this in JIRA. I was  
>> playing
>> around with HttpClient and it makes a call to  
>> UtilHttp.urlEncodeArgs to
>> escape the parameter string. At line 462 is:
>>
>>                         if (buf.length() > 0) buf.append("&");
>>
>> I believe it should be just "&" for url parameters, right? The scary
>> thing is that I am not all that sure that I didn't put it there.
>>
>> -Al
>>
>> _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/dev
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dev - ampersand encoding in urlEncodeArgs

byersa
I wonder if we might want to consider deprecating HttpClient for
HTTPClient(http://www.innovation.ch/java/HTTPClient/). The things I see
that are better are that it follows client-side redirects and handles
cookies automatically. It has an LGPL license.

-Al
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - ampersand encoding in urlEncodeArgs

Si Chen-2
Al,

My personal vote is that we avoid the LGPL things if we can.

Si

Al Byers wrote:

>I wonder if we might want to consider deprecating HttpClient for
>HTTPClient(http://www.innovation.ch/java/HTTPClient/). The things I see
>that are better are that it follows client-side redirects and handles
>cookies automatically. It has an LGPL license.
>
>-Al
>
>_______________________________________________
>Dev mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/dev
>
>  
>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - ampersand encoding in urlEncodeArgs

davidnwelton
On 1/20/06, Si Chen <[hidden email]> wrote:
> Al,
>
> My personal vote is that we avoid the LGPL things if we can.

FYI:

It's still under discussion at Apache, but keep in mind that LGPL
stuff + ASF projects is not usually a good mix.  If you need some
clarification, the incubator mailing list would be a good place,
because I can't explain it as well as some people there are able to.
(I generally find licensing a PITA to deal with:-/ ).

--
David N. Welton
 - http://www.dedasys.com/davidw/

Linux, Open Source Consulting
 - http://www.dedasys.com/
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - ampersand encoding in urlEncodeArgs

David E. Jones

I agree that unless there is simply no alternative we should really  
avoid LGPL licensed stuff, and 100% never use GPL or Mozilla or other  
similarly licensed stuff. For things that do use an LGPL library,  
like the Open Office stuff, we should just try to limit dependencies  
on that code and make it as isolated as possible because it may  
become necessary if anything gets sticky to pull that into a separate  
open source project or something.

For this specific thing I think there are various alternatives. I  
haven't looked into it for a while, but I think there is even an  
Apache Jakarta (perhaps in the commons) tool that did some nice  
things in this area...

-David


On Jan 20, 2006, at 10:31 AM, David Welton wrote:

> On 1/20/06, Si Chen <[hidden email]> wrote:
>> Al,
>>
>> My personal vote is that we avoid the LGPL things if we can.
>
> FYI:
>
> It's still under discussion at Apache, but keep in mind that LGPL
> stuff + ASF projects is not usually a good mix.  If you need some
> clarification, the incubator mailing list would be a good place,
> because I can't explain it as well as some people there are able to.
> (I generally find licensing a PITA to deal with:-/ ).
>
> --
> David N. Welton
>  - http://www.dedasys.com/davidw/
>
> Linux, Open Source Consulting
>  - http://www.dedasys.com/
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev