You can send a static file to the browser by specifying a special header in the response through FastCGI:>From the horses mouth:first: tell lighttpd that you want to trust the backend on the selection of the file: "allow-x-send-file" => "enable" in fastcgi.server second: send "X-LIGHTTPD-send-file: /secret/file.zip" in the header Joshua Sierles _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Sorry for my ignorance, but why would one want to do this? On 16-Sep-05, at 10:24 AM, Joshua Sierles wrote:> You can send a static file to the browser by specifying a special > header in the response through FastCGI: > > From the horses mouth: > > first: tell lighttpd that you want to trust the backend on the > selection of the file: "allow-x-send-file" => "enable" in > fastcgi.server > second: send "X-LIGHTTPD-send-file: /secret/file.zip" in the header > > Joshua Sierles > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Say you had some trial software (setup.exe) and didn''t want to publicize the URL. You could require a form to be filled out prior to releasing the download. On 9/16/05, David Teare <dteare-LXYvB7aEQDJCkLs28/y7ANBPR1lH4CV8@public.gmane.org> wrote:> > Sorry for my ignorance, but why would one want to do this? > > On 16-Sep-05, at 10:24 AM, Joshua Sierles wrote: > > > You can send a static file to the browser by specifying a special > > header in the response through FastCGI: > > > > From the horses mouth: > > > > first: tell lighttpd that you want to trust the backend on the > > selection of the file: "allow-x-send-file" => "enable" in > > fastcgi.server > > second: send "X-LIGHTTPD-send-file: /secret/file.zip" in the header > > > > Joshua Sierles > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
ensured security. give users some url like http://www.domain.com/download/long-random-checksum-of-some-kind then you can keep track of who has downloaded what, how many times, and from where. On 9/16/05, Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Say you had some trial software (setup.exe) and didn''t want to publicize the > URL. You could require a form to be filled out prior to releasing the > download. > > > > On 9/16/05, David Teare <dteare-LXYvB7aEQDJCkLs28/y7ANBPR1lH4CV8@public.gmane.org> wrote: > > Sorry for my ignorance, but why would one want to do this? > > > > On 16-Sep-05, at 10:24 AM, Joshua Sierles wrote: > > > > > You can send a static file to the browser by specifying a special > > > header in the response through FastCGI: > > > > > > From the horses mouth: > > > > > > first: tell lighttpd that you want to trust the backend on the > > > selection of the file: "allow-x-send-file" => "enable" in > > > fastcgi.server > > > second: send "X-LIGHTTPD-send-file: /secret/file.zip" in the header > > > > > > Joshua Sierles > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
... addon. im kinda surprised you have to enable this in lighttpd, you can do this without any options at all with mod_php or is that a totally different story? :x On 9/17/05, Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ensured security. > > give users some url like > http://www.domain.com/download/long-random-checksum-of-some-kind > then you can keep track of who has downloaded what, how many times, > and from where. > > On 9/16/05, Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Say you had some trial software (setup.exe) and didn''t want to publicize the > > URL. You could require a form to be filled out prior to releasing the > > download. > > > > > > > > On 9/16/05, David Teare <dteare-LXYvB7aEQDJCkLs28/y7ANBPR1lH4CV8@public.gmane.org> wrote: > > > Sorry for my ignorance, but why would one want to do this? > > > > > > On 16-Sep-05, at 10:24 AM, Joshua Sierles wrote: > > > > > > > You can send a static file to the browser by specifying a special > > > > header in the response through FastCGI: > > > > > > > > From the horses mouth: > > > > > > > > first: tell lighttpd that you want to trust the backend on the > > > > selection of the file: "allow-x-send-file" => "enable" in > > > > fastcgi.server > > > > second: send "X-LIGHTTPD-send-file: /secret/file.zip" in the header > > > > > > > > Joshua Sierles > > > > _______________________________________________ > > > > Rails mailing list > > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >-- Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>