location ~* ^/(.+)$ {
fastcgi_param TEST $1; fastcgi_param FOO "bar"; fastcgi_param REMOTE_ADDR $http_x_real_ip; fastcgi_param HTTP_CLIENT_IP $http_x_real_ip; fastcgi_split_path_info ^(.+.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_pass 127.0.0.1:9150; include fastcgi_params; }
} package main--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks Brad,I can confirm for anyone reading this later thatreq.Header.Get("Foo")req.Header.Get("FOO")Work for someone passing HTTP_FOO in a fastcgi param in nginxRegarding os.Environ I understand what you are saying (and thought that myself), though I think something else is going on as its used in net/http/cgir, err := RequestFromMap(envMap(os.Environ()))And is accessing things like REQUEST_URI that appear to be part of the environment in that scope.
Thanks Brad,
I can confirm for anyone reading this later that
req.Header.Get("Foo")req.Header.Get("FOO")
Work for someone passing HTTP_FOO in a fastcgi param in nginx
Regarding os.Environ I understand what you are saying (and thought that myself), though I think something else is going on as its used in net/http/cgi
r, err := RequestFromMap(envMap(os.Environ()))
250 httpReq, err := cgi.RequestFromMap(req.params)
So, nothing is read from the environment.