[Nitro] Webrick not serving files without dots

George Moschovitis george.moschovitis at gmail.com
Sat Jan 20 13:37:38 EST 2007

this was the original design of Nitro: handle only files without extension.
all the other files (generally static, media files are handled by the 'web
browser'. However, as you (and others) have pointed out, this is kind of
limiting. After a long period of thinking over this, I have come to a very
satisfactory solution. I will describe it in a post to this group tomorrow
(I am in a hurry at the moment), and if most people here think it is the
right way to go, I will implement it.


On 1/20/07, Jonathan Buch <john at oxyliquit.de> wrote:
> Hi George,
> I find this patch a little questionable.  Is this just a speed
> enhancement, or does is serve another purpose?
> Could we add a File.file?() up there?
> Wed Dec 20 16:41:08 CET 2006  George Moschovitis <
> george.moschovitis at gmail.com>
>    * Dont pass resource uris to Nitro and don't try to handle Nitro uris
> with Webricks FileHandler.
> diff -rN old-nitro-0.40-own/nitro/lib/nitro/adapter/webrick.rb
> new-nitro-0.40-own/nitro/lib/nitro/adapter/webrick.rb
> 123a124,125
> >     return(false) unless req.path_info =~ /\./
> (Not yet active coding etc again, I just remembered this bit and
> don't want to let this slide into the 'dust'.)
> This should work the same in any adapter.  With Apache for example,
> when the file exists, serve, if not, call nitro.  The same behaviour
> should be replicated with webrick/mongrel as well.
> Have a nice day,
> Jo
> --
> Feel the love
> http://pinkjuice.com/pics/ruby.png
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070120/12ea6582/attachment.html 

More information about the Nitro-general mailing list