flea
                                
                                 flea copied to clipboard
                                
                                    flea copied to clipboard
                            
                            
                            
                        Allow any fcgi variable to be queried
Allow all fcgi variables to be queried, not just the HTTP_ ones.
I have a few objections to this:
- I can't imagine any use cases for this
- I don't think fcgi variables don't belong with the request headers
- You can already require( "fcgi" )and call getenv directly if you need it
My two use cases both involve getting the IP address (REMOTE_ADDR). I don't have strong feelings on this one as getenv() can handle it. Having it available under request "feels" cleaner, but I'm not sure the change is worth a single field accessor.
REMOTE_ADDR is a special case (right???) so I think handling it separately is the neatest solution. And now this means I need to look at X-Forwarded-For headers.
I'll have to put it off for a couple more weeks since I changed jobs recently, so apologies for not pulling my weight here. :)
I'm really not sure about REMOTE_ADDR. Do proxies (and application servers?) blow this away? I haven't tested this one outside of localhost yet, so I don't know how fragile it is in the real world.
And no worries, these are all just minor nits. Easy enough to send pulls for.
They do, and they('re supposed to) add REMOTE_ADDR to X-Forwarded-For at every hop.
In that case, this PR just became rather complicated. I'll try and look at this, but I don't have any setup to test it in. I'm not in a rush for this one, and I'll have to go test what my server actually does.