* Kent Sibilev <ksibilev-Bdlq13kUjeyLZ21kGMrzwg@public.gmane.org> [0231
17:31]:> Dick Davies
<rasputnik-ogHSZ3ARDZIOXkKaSkYkkl6hYfS7NtTn@public.gmane.org> writes:
> > It does''nt seem to be as fast as I''ve heard, and I
notice that
> > rails uses fcgi.rb''s each_cgi() method.
> >
> > On my version, that''s a pure ruby function (fcgi.so
doesn''t have
> > that method). Is this right, or should I be using a different
> > version?
>
> fastcgi extension comes with native part and ruby part. When you
> require ''fcgi'' you load fcgi.rb part which tries to load
fcgi.so
> dynamic library. If it fails to do it, fcgi.rb emulates fcgi protocol
> in pure ruby. each_cgi is a pure ruby method implemented in fcgi.rb.
>
> If you see that fastcgi extension is not as fast as you expect, try to
> load the native part explicitly like so: require
''fcgi.so''
Sorry, I might have explained this badly. What I''m asking is
''does
everyone else have a C-based each_cgi method, because I don''t seem to:
(from /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb: )
550 # There is no C version of ''each_cgi''
551 # Note: for ruby-1.6.8 at least, the constants CGI_PARAMS/CGI_COOKIES
552 # are defined within module ''CGI'', even if you have
subclassed it
553
554 class FCGI
555 def self::each_cgi(*args)
556 require ''cgi''
557
--
''Some people, when confronted with a problem, think I know,
I''ll use
regular expressions. Now they have two problems.''
-- Jamie Zawinski
Rasputin :: Jack of All Trades - Master of Nuns