You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michel Jansen <Mi...@Web-ICT.com> on 2012/01/26 09:01:32 UTC

Font Problem

Hi There,

I have a probem using webfonts in Firefox. It won't let me use webfonts 
from another url than the original. Since i am working with a 
perlhandler that "catches" all requests from / and up, i would like to 
know of someone knows how i can bypass my handler for a specific 
directory above / like for example /fonts/. It would be nice if the 
handler can be told to handle all requests bot not for /fonts/ and pass 
this request to apache....

Hoping for some help here....

Kindest regards,

Michel




Re: Font Problem

Posted by André Warnier <aw...@ice-sa.com>.
Michel Jansen wrote:
> Hi André,
> 
> This works! Thanx for your help..... Of course i now have another 
> problem.....! Firefox now rejects the font saying: downloadable font: 
> rejected by sanitizer ;-)
> 
Michel,

Glad that it helped.

But please respond to the list, not to my private email address.

When you send to the list, the others on the list also see your answer and can see that 
the problem is solved and how.
Also, that way your message will arrive in the list archives, and someone else with the 
same problem and who searches the list archives, will also see it, without needing to ask.

If you send our message to me, the above does not happen.
Do not even send me a copy.  I am subscribed to the list and I get all messages to the 
list automatically. If you send me a copy, I get the same message twice, which is 
unnecessary and annoying.
In addition, when you send an email to my address, my email filters are such that your 
emails land in my "junk" folder (which I just happened to check, that's why I saw it).


Re: Font Problem

Posted by André Warnier <aw...@ice-sa.com>.
André Warnier wrote:
> Michel Jansen wrote:
>> Hi There,
>>
>> I have a probem using webfonts in Firefox. It won't let me use 
>> webfonts from another url than the original. Since i am working with a 
>> perlhandler that "catches" all requests from / and up, i would like to 
>> know of someone knows how i can bypass my handler for a specific 
>> directory above / like for example /fonts/. It would be nice if the 
>> handler can be told to handle all requests bot not for /fonts/ and 
>> pass this request to apache....
>>
> Have you tried returning Apache2::Const::DECLINED from your handler if 
> the URL is "/fonts/*" ?
> 
> See here :
> http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlResponseHandler
> (and check RUN_FIRST)
> 
> As far as I understand, if your handler returns DECLINED, and there are 
> no more explicit handlers defined, then Apache should serve the request 
> with it's default handler, which should be what you want.
> 

Another solution which you might try, without modifying your handler :

1) read these :

http://httpd.apache.org/docs/2.2/mod/core.html#sethandler
http://httpd.apache.org/docs/2.2/mod/core.html#location

2) configure as follows :

<Location />
   SetHandler mod_perl
   PerlResponseHandler my_module
   ...
</Location>

<Location /fonts/>
   SetHandler none
</Location>


Re: Font Problem

Posted by André Warnier <aw...@ice-sa.com>.
Michel Jansen wrote:
> Hi There,
> 
> I have a probem using webfonts in Firefox. It won't let me use webfonts 
> from another url than the original. Since i am working with a 
> perlhandler that "catches" all requests from / and up, i would like to 
> know of someone knows how i can bypass my handler for a specific 
> directory above / like for example /fonts/. It would be nice if the 
> handler can be told to handle all requests bot not for /fonts/ and pass 
> this request to apache....
> 
Have you tried returning Apache2::Const::DECLINED from your handler if the URL is "/fonts/*" ?

See here :
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlResponseHandler
(and check RUN_FIRST)

As far as I understand, if your handler returns DECLINED, and there are no more explicit 
handlers defined, then Apache should serve the request with it's default handler, which 
should be what you want.