Are you sure this doesn't break mongrel? Have you tested it? <br><br>thanks,<br>-g.<br><br><br><br><div><span class="gmail_quote">On 10/19/07, <b class="gmail_sendername">Arne Brasseur</b> <<a href="mailto:arne@arnebrasseur.net">
arne@arnebrasseur.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
Ok, this should fix FastCGI (and also CGI).<br>
<br>
Cgi.process has been factored out into a seperate handler class and
adapted to the way things currently work.<br>
<br>
I've tested both CGI and FastCGI with Lighttpd and wrote a Tip on
OxyWTF on how to configure Lighttpd for FastCGI.<br>
<br>
(ab)<br><span class="sg">
<br>
Arne Brasseur schreef:
</span><div><span class="e" id="q_115b783a8f268141_2"><blockquote cite="http://mid47183AAD.2040303@arnebrasseur.net" type="cite">
<pre>Patience, I'm almost done with this.<br><br>(ab)<br><br>Robert Mela schreef:<br> </pre>
<blockquote type="cite">
<pre>Here's an initial cracking of the nut. Needs much refinement.<br><br>I have no idea whether this handles posts or not -- my hope is all the <br>gnarly details are now handled by handle_context in adapter.rb
.<br><br>If the approach is acceptable then there's probably a lengthy method <br>in raw/cgi.rb that can be removed.<br><br><br>require "raw/adapter"<br><br># No multi-threading.<br>Og.thread_safe = false if defined?(Og) and
Og.respond_to?(:thread_safe)<br><br>module Raw<br><br># A plain CGI adapter. To be used only in development<br># environments, this adapter is *extremely* slow for<br># live/production environments. This adapter is provided for
<br># the sake of completeness.<br><br> class CgiAdapter<br> include AdapterHandlerMixin<br> <br> def start(server) # for server in context of CGI this is start, <br>middle and end!<br> @application = server # expected by handle_context in
adapter.rb<br> context = Context.new(server)<br> context.env = ENV<br> uri = ENV['REQUEST_URI']<br> script_name = ENV['SCRIPT_NAME']<br> context.env['REQUEST_URI'] = uri.sub(/#{script_name}/i, '')
<br> handle_context( context )<br> puts "Content-type: #{context.content_type}"<br> context.response_headers['Content-length'] = <br>context.output_buffer.length<br> context.response_headers.each
{ |k,v| puts "#{k}: #{v}" }<br> puts "\n"<br> puts context.output_buffer<br> end<br> end<br>end<br><br> </pre>
<blockquote type="cite">
<pre>Arne Brasseur wrote:<br> </pre>
<blockquote type="cite">
<pre>This seems the way to go, but unfortunately mod_proxy is not an <br>option for me. I'm on shared hosting with little chance of changing <br>apache's configuration, except by .htaccess files. It seems both cgi
<br>and fcgi adapters are simply broken because of changes to the <br>adapter interface. E.g. what used to be class methods are now <br>instance methods, but that's not all.<br><br>Would it be hard to fix them? Or just one of them? I'm not too
<br>concerned about performance at this point, if it runs I'd be happy. <br>If they're not being fixed please add a big BROKEN sign or remove <br>them altogether.<br><br>Thank you (once again)!<br><br>(ab)<br>
</pre>
</blockquote>
<pre>_______________________________________________<br>Nitro-general mailing list<br><a href="mailto:Nitro-general@rubyforge.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Nitro-general@rubyforge.org
</a>
<a href="http://rubyforge.org/mailman/listinfo/nitro-general" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://rubyforge.org/mailman/listinfo/nitro-general</a>
</pre>
</blockquote>
<pre>_______________________________________________<br>Nitro-general mailing list<br><a href="mailto:Nitro-general@rubyforge.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Nitro-general@rubyforge.org
</a>
<a href="http://rubyforge.org/mailman/listinfo/nitro-general" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://rubyforge.org/mailman/listinfo/nitro-general</a>
</pre>
</blockquote>
<pre> </pre>
</blockquote>
<br>
<br>
<pre cols="72">-- <br>Arne Brasseur<br><a href="http://www.arnebrasseur.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.arnebrasseur.net</a>
<a href="http://www.zhongwiki.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.zhongwiki.com</a>
<a href="http://www.bankske.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.bankske.org</a>
<a href="mailto:arne@arnebrasseur.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">arne@arnebrasseur.net</a>
</pre>
</span></div></div>
<br>_______________________________________________<br>Nitro-general mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Nitro-general@rubyforge.org">Nitro-general@rubyforge.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://rubyforge.org/mailman/listinfo/nitro-general" target="_blank">http://rubyforge.org/mailman/listinfo/nitro-general</a><br><br clear="all"></blockquote>
</div><br><br clear="all"><br>-- <br><a href="http://gmosx.me.gr">http://gmosx.me.gr</a><br><a href="http://phidz.com">http://phidz.com</a><br><a href="http://blog.gmosx.com">http://blog.gmosx.com</a><br><a href="http://cull.gr">
http://cull.gr</a><br><a href="http://www.joy.gr">http://www.joy.gr</a><br><a href="http://nitroproject.org">http://nitroproject.org</a>