Parsing non-English URLs

Angie T. Muhammad angie.tawfik at gmail.com
Tue Jun 8 17:34:26 CEST 2010


My bad! I was missing something the last time.
Eventually the syntax below worked :D .. woot woot !!
Thank you Tollef and everybody for helping.

On Thu, Jun 3, 2010 at 2:45 PM, Angie T. Muhammad <angie.tawfik at gmail.com>wrote:

> Hello group,
>
> I tried using the %-escaped syntax but it does not work for me. Here is the
> rule that varnish totally ignores as if it doesn't exist:
>
>
> ===========================================================================================
>    # cache AR taxonomy differently
>      else if (req.url ==
> "/%25D9%2588%25D8%25B3%25D9%2588%25D9%2585%25D8%25A7%25D8%25AA") {
>
>       set beresp.http.X-Cacheable = "Yes";
>       set beresp.ttl = 180m;
>       return(deliver);
>      }
>
>  ==========================================================================================
>
> The link exists, and even copying it in this syntax to the browser
> retrieves the page, but the caching for 180 minutes does not work. Other
> rules with only English URLS are working like a charm. Please help.
>
> Thanks.
>
>
>
> On Wed, Jun 2, 2010 at 3:56 PM, Angie T. Muhammad <angie.tawfik at gmail.com>wrote:
>
>> I tried the second syntax many times before. Varnish refuses to start.
>> But the good news it accepted the first syntax. I will be checking if
>> it applies the rule as required and update you.
>>
>> Thank you Tollef :)
>>
>> On 6/2/10, Tollef Fog Heen <tfheen at varnish-software.com> wrote:
>> > ]] "Angie T. Muhammad"
>> >
>> > | I get some lines like:
>> > |    14 TxHeader     b Referer:
>> > |
>> >
>> http://myserver.example.com/news/%D8%A7%D9%84%D9%85%D9%84%D9%8A%D8%A7%D8%B1%D8%AF%D9%8A%D8%B1-%D8%A7%D9%84%D9%85%D8%B5%D8%B1%D9%8A-%C2%AB%D9%85%D8%AD%D9%85%D8%AF-%D8%A7%D9%84%D9%81%D8%A7%D9%8A%D8%AF%C2%BB-%D9%8A%D9%82%D8%B1%D8%B1-%D8%A8%D9%8A%D
>> > |
>> > | The point is that I need to make varnish accept such percentages or
>> any
>> > | other syntax in VCL file. So that some pages are cached longer based
>> on
>> > | their Arabic address (Like the one in the referer above).
>> >
>> > We use %-escaped strings in vcl, so referring to that string above would
>> > be to match it to
>> >
>> > «
>> http://myserver.example.com/news/%25D8%25A7%25D9%2584%25D9%2585%25D9%2584%25D9%258A%25D8%25A7%25D8%25B1%25D8%25AF%25D9%258A%25D8%25B1-%25D8%25A7%25D9%2584%25D9%2585%25D8%25B5%25D8%25B1%25D9%258A-%25C2%25AB%25D9%2585%25D8%25AD%25D9%2585%25D8%25AF-%25D8%25A7%25D9%2584%25D9%2581%25D8%25A7%25D9%258A%25D8%25AF%25C2%25BB-%25D9%258A%25D9%2582%25D8%25B1%25D8%25B1-%25D8%25A8%25D9%258A%25D
>> »
>> >
>> > or more easily
>> >
>> > {"
>> http://myserver.example.com/news/%D8%A7%D9%84%D9%85%D9%84%D9%8A%D8%A7%D8%B1%D8%AF%D9%8A%D8%B1-%D8%A7%D9%84%D9%85%D8%B5%D8%B1%D9%8A-%C2%AB%D9%85%D8%AD%D9%85%D8%AF-%D8%A7%D9%84%D9%81%D8%A7%D9%8A%D8%AF%C2%BB-%D9%8A%D9%82%D8%B1%D8%B1-%D8%A8%D9%8A%D
>> "}
>> >
>> > --
>> > Tollef Fog Heen
>> > Varnish Software
>> > t: +47 21 54 41 73
>> >
>>
>>
>> --
>> All the best,
>> Angie T. Muhammad
>> Linux Systems Engineer
>> Al Masry Al Youm
>> http://www.almasryalyoum.com/en
>>
>
>
>
> --
> All the best,
> Angie T. Muhammad
> Linux Systems Engineer
> Al Masry Al Youm
> http://www.almasryalyoum.com/en
>



-- 
All the best,
Angie T. Muhammad
Linux Systems Engineer
Al Masry Al Youm
http://www.almasryalyoum.com/en
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100608/9750f1fd/attachment-0003.html>


More information about the varnish-misc mailing list