Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [maxq-dev] a patch for URLs that are not properly URL encoded

maxq
Discussion topic

Back to topic list

Re: [maxq-dev] a patch for URLs that are not properly URL encoded

Author oliverbock
Full name Oliver Bock
Date 2005-06-22 00:32:29 PDT
Message There is no formal process. It is a simple change so if you have
rebuilt maxq and tested it then I think that will do. Go ahead and
commit. Thanks!


    Oliver

--
On 22/06/2005, at 17:24, Brian Moore wrote:
> i've received the developer role, and i'm not
> sure of the process here, sorry. may i commit
> the following patch?
>
> thanks much in advance,
>
> b
>
> ====================​====================​====================​=======
> RCS file: /cvs/maxq/java/com/b​itmechanic/maxq/Http​TestCase.java,v
> retrieving revision 1.20
> diff -r1.20 HttpTestCase.java
> 220,225c220,231
> < int a = Character.digit(s.ch​arAt(count++), 16);
> < a = a << 4;
> < int b = Character.digit(s.ch​arAt(count), 16);
> < // prefix ' (ascii 39) or " (ascii 132) with '\' (ascii 92)
> < if (a + b == 39 || a + b == 132) out.write(92);
> < out.write(a + b);
> ---
>> if(count < s.length()) {
>> int a = Character.digit(s.ch​arAt(count++), 16);
>> a = a << 4;
>> int b = Character.digit(s.ch​arAt(count), 16);
>> // prefix ' (ascii 39) or " (ascii 132) with '\' (ascii 92)
>> if (a + b == 39 || a + b == 132) out.write(92);
>> out.write(a + b);
>> }
>> else {
>> // compensate for URLs that end in %
>> out.write('%');
>> }
>
>
> --- Brian Moore <brianmooreca at yahoo dot com> wrote:
>
>> i've applied for a developer role.
>>
>> thanks,
>>
>> b
>>
>> --- Oliver Bock <oliver at g7 dot org> wrote:
>>
>>> Hi Brian,
>>>
>>> I was going to apply your patch, but unfortunately the file (and the
>>> function) you have modified has changed since the release your patch
>>> is
>>> based on. Would you consider applying for the developer role and
>>> applying your patch to the CVS root?
>>>
>>>
>>> Oliver
>>>
>>> --
>>> On 22/06/2005, at 04:35, Brian Moore wrote:
>>>
>>>> hello,
>>>>
>>>> i've been using maxq on a site that doesn't properly URL encode
>>>> its URLs. while this is incorrect i can't change them, so i've
>>>> modified maxq to deal properly with these malformed URLs.
>>>>
>>>> in particular the urls are of the form:
>>>> htp://host:port/foo/bar/baz?q=%
>>>> they intended q to hold the string "%" but this is obviously
>>>> incorrect. it's a very special case, and i don't know if you'd
>>>> like to take the patch or not, but i'm providing it in case
>>>> you'd like to take it. please find it attached and below,
>>>>
>>>> b
>>>>
>>>> --- before Tue Jun 21 11:10:28 2005
>>>> +++ HttpTestCase.java Mon Jun 20 16:32:34 2005
>>>> @@ -203,12 +203,18 @@
>>>> for(int count=0; count<s.length(); count++){
>>>> if(s.charAt(count)=='%'){
>>>> count++;
>>>> - int a=Character.digit(s.​charAt(count++),16);​
>>>> - a=a<<4;
>>>> - int b=Character.digit(s.​charAt(count),16);
>>>> - // prefix ' (ascii 39) or " (ascii 132) with '\' (ascii 92)
>>>> - if ( a+b == 39 || a+b == 132 ) out.write(92);
>>>> - out.write(a+b);
>>>> + if(count < s.length()) {
>>>> + int a=Character.digit(s.​charAt(count++),16);​
>>>> + a=a<<4;
>>>> + int b=Character.digit(s.​charAt(count),16);
>>>> + // prefix ' (ascii 39) or " (ascii 132) with '\' (ascii 92)
>>>> + if ( a+b == 39 || a+b == 132 ) out.write(92);
>>>> + out.write(a+b);
>>>> + }
>>>> + else {
>>>> + // pass through a final %
>>>> + out.write('%');
>>>> + }
>>>> }
>>>> else {
>>>> if(s.charAt(count)=='+')
>>>>
>>>>
>>>> ____________________​____________________​__________
>>>> Do You Yahoo!?
>>>> Tired of spam? Yahoo! Mail has the best spam protection around
>>>> http://mail.yahoo.com
>>>> <patch>-------​--------------------​--------------------​--------------
>>>> ---
>>>> -----
>>>> To unsubscribe, e-mail: dev-unsubscribe at maxq dot tigris dot org
>>>> For additional commands, e-mail: dev-help at maxq dot tigris dot org
>>>
>>>
>>> --------------------​--------------------​--------------------​---------
>>> To unsubscribe, e-mail: dev-unsubscribe at maxq dot tigris dot org
>>> For additional commands, e-mail: dev-help at maxq dot tigris dot org
>>>
>>>
>>
>>
>>
>>
>> ____________________​____________________​____________
>> Yahoo! Sports
>> Rekindle the Rivalries. Sign up for Fantasy Football
>> http://football.fant​asysports.yahoo.com
>>
>> --------------------​--------------------​--------------------​---------
>> To unsubscribe, e-mail: dev-unsubscribe at maxq dot tigris dot org
>> For additional commands, e-mail: dev-help at maxq dot tigris dot org
>>
>>
>
>
>
>
> ____________________​______________
> Do you Yahoo!?
> Make Yahoo! your home page
> http://www.yahoo.com/r/hs
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe at maxq dot tigris dot org
> For additional commands, e-mail: dev-help at maxq dot tigris dot org
>
>

« Previous message in topic | 5 of 6 | Next message in topic »

Messages

Show all messages in topic

a patch for URLs that are not properly URL encoded brianmooreca Brian Moore 2005-06-21 11:35:28 PDT
     Re: [maxq-dev] a patch for URLs that are not properly URL encoded oliverbock Oliver Bock 2005-06-21 15:33:39 PDT
         Re: [maxq-dev] a patch for URLs that are not properly URL encoded brianmooreca Brian Moore 2005-06-21 16:15:52 PDT
             Re: [maxq-dev] a patch for URLs that are not properly URL encoded brianmooreca Brian Moore 2005-06-22 00:24:18 PDT
                 Re: [maxq-dev] a patch for URLs that are not properly URL encoded oliverbock Oliver Bock 2005-06-22 00:32:29 PDT
                     Re: [maxq-dev] a patch for URLs that are not properly URL encoded brianmooreca Brian Moore 2005-06-22 09:23:15 PDT
Messages per page: