Thanks for the suggestion.  I have a full blown Merb project and
wanted to extend it to protect the files being served out from one
part of it.

I'll consider Sinatra for the next project, though more likely I will
go with Python and GAE to make use of the cloud.

The problem here is the $ prepended to params.

Also the headers have been encapsulated in nginx_send_file.  (One can
be passed as a parameter.)

-Ming

On Feb 21, 5:18 pm, Michishige Kaito <[email protected]> wrote:
> Try Sinatra before resorting to PHP?
>
> 2010/2/21 Ming <[email protected]>
>
>
>
> > I may just run php for this one directory to protect the file instead
> > of using merb.
>
> > Aside from my not being to figure out how to access the headers, it
> > also seems that a filename "x.y" can't used in a route, as :file.
>
> > On Feb 21, 7:17 am, Ming <[email protected]> wrote:
> > > I'm trying to set headers following the second example in this
> > > tutorialhttp://merbunity.com/tutorials/2:
>
> > >  headers['Content-Disposition'] = "attachment; filename =
> > > #{get_the_file_name}"
> > >  headers['Content-Type'] ="#{get_the_file_content_type}"
>
> > > I get undefined method `[]' for nil:NilClass
>
> > > I've tried
>
> > > header
> > > headers
> > > response.header
> > > response.headers
> > > @response.header
> > > @response.headers
>
> > > all to no avail.
>
> > > ?
>
> > > TIA
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "merb" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected] <merb%[email protected]>.
> > For more options, visit this group at
> >http://groups.google.com/group/merb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.

Reply via email to