Re: http_referrer

2012-04-17 Thread Dave Everitt
Just to be clear (obviously env vars are going to differ according to setup, but): when env is used inside Camping, it's equivalent to @env and get Rack env vars when ENV is used, it will get any other environment variables, not just from Passenger etc. but also any set by the system.

Re: http_referrer

2012-04-17 Thread Dave Everitt
Hi cdr - thanks for this, but I've not been able to do key value on the Rack envs as some seem to have a different format - see the other post I added to this thread - DaveE how Rack env vars are stored, and how to get a nice printout? i defined #to_html on everything. on Array thats

Re: http_referrer

2012-04-16 Thread Nokan Emiro
I'm totally convinced... so I'm going to download the whole source before the guys start to rewrite it as a modern framework... :) But to be frank, this, for instance, is not so great to read: https://github.com/camping/camping/blob/master/lib/camping.rb I mean I'm big http://catseye.tc/ fan,

Re: http_referrer

2012-04-16 Thread david costa
Well the point of the original camping was *not* to be easy to read nor to have camping used in the next big commercial project. The annotated version gives you pretty much all you want if you want to read it :) On Mon, Apr 16, 2012 at 10:59 PM, Bartosz Dziewoński matma@gmail.comwrote: W

Re: http_referrer

2012-04-16 Thread Philippe Monnet
I think Nokan has a good point there: it is not easy for people new to Camping to know about the trick to compile/process/compact the source code. So an idea for the new version could be to leave the source as is (unabridged). Plus this makes debugging easier. :-) On 4/16/2012 2:59 PM, Bartosz

Re: http_referrer

2012-04-15 Thread Magnus Holm
On Sat, Apr 14, 2012 at 10:38, Dave Everitt dever...@innotts.co.uk wrote: Haha! How did you get Spock on board... :-) I must admit I'm a little confused about the sytnax for environmental variables, because as well as   @env[HTTP_REFERER] this also works:   ENV['SCRIPT_NAME'] For a test I

Re: http_referrer

2012-04-15 Thread Dave Everitt
Understood about compatible - this is David's Camping server, and I'm experimenting with QUERY_STRING in the URL and various other env vars - DaveE On Sat, Apr 14, 2012 at 10:38, Dave Everitt dever...@innotts.co.uk wrote: Haha! How did you get Spock on board... :-) I must admit I'm a

Re: http_referrer

2012-04-15 Thread david costa
Ah well the is not on fcgi but passenger :) I would say that most of the serious ruby/rails hosting now offer passenger as an option so shouldn't limit your application portability. On Sun, Apr 15, 2012 at 11:41 PM, Dave Everitt dever...@innotts.co.ukwrote: Understood about compatible - this is

Re: http_referrer

2012-04-15 Thread Jenna Fox
O_o I think the extra character is worth it. — Jenna On Monday, 16 April 2012 at 9:40 AM, david costa wrote: Ah well the is not on fcgi but passenger :) I would say that most of the serious ruby/rails hosting now offer passenger as an option so shouldn't limit your application

Re: http_referrer

2012-04-15 Thread david costa
sure I was just explaining that was not fcgi :) BTW I am making some good progress with the on the fly deployment. I have found an apparently good security solution to allow users to deploy their app without major problems and at the same time not compromise other users/the server. More testing

Re: http_referrer

2012-04-14 Thread Dave Everitt
Haha! How did you get Spock on board... :-) I must admit I'm a little confused about the sytnax for environmental variables, because as well as @env[HTTP_REFERER] this also works: ENV['SCRIPT_NAME'] For a test I just used it like this: ENV['SCRIPT_NAME'].scan(/\w+\.\w+$/) to get the

Re: http_referrer

2012-04-14 Thread Dave Everitt
About environment variables - I've just used this in my Camping helpers to print them all out, but the Rack variables seem to have multiple values or values with no name: def envars(theenv) if theenv == ENV ul do theenv.each_pair do |name,value| li { name + + value }

Re: http_referrer

2012-04-08 Thread Nokan Emiro
Starship Enterprise, Stardate #{Time.now.to_f}. Captain's Log. network.http.sendrefererheader was set to 0 in my Firefox for unknown reasons. Probably Mr Spock, the Chief of security did this. I make this log entry for those who don't want to spend hours in a spacedock repairing a working

Re: http_referrer

2012-04-07 Thread Nokan Emiro
Why does it work without the @ for me? On Fri, Apr 6, 2012 at 4:26 PM, Magnus Holm judo...@gmail.com wrote: It should be in @env: @env['HTTP_REFERER'] (Note that it's misspelled in the spec) ___ Camping-list mailing list

Re: http_referrer

2012-04-06 Thread Nokan Emiro
I'm sorry bothering you, it was there in env, env['HTTP_REFERER']. (But it still would be useful sometimes to access the Rack's Request object...) On Fri, Apr 6, 2012 at 3:01 PM, Nokan Emiro uzleep...@gmail.com wrote: Hi, How can I access the Rack request object in a controller? I need

Re: http_referrer

2012-04-06 Thread Magnus Holm
Try @request. // Magnus Holm On Friday 6. April 2012 at 16:27, Nokan Emiro wrote: I'm sorry bothering you, it was there in env, env['HTTP_REFERER']. (But it still would be useful sometimes to access the Rack's Request object...) On Fri, Apr 6, 2012 at 3:01 PM, Nokan Emiro

Re: http_referrer

2012-04-06 Thread Magnus Holm
It should be in @env: @env['HTTP_REFERER'] (Note that it's misspelled in the spec) // Magnus Holm On Friday 6. April 2012 at 15:01, Nokan Emiro wrote: Hi, How can I access the Rack request object in a controller? I need to know the HTTP_REFERRER, but I can't find it in env. (I'm