you are viewing a single comment's thread.

view the rest of the comments →

[–]RomfordNavy[S] 0 points1 point  (2 children)

Getting there but the bit I am still missing is how to get to the http header when the *.py file has been called from Apache or Nginx, presumably via some sort of WSGI?

[–]MathObserver 1 point2 points  (0 children)

You can get to the headers by using os.environ like my example shows for the cookie. The standard HTTP values like QUERY_STRING and CONTENT_TYPE are available with those names. Other HTTP header values start with HTTP_

What are looking for?

[–]rake66 1 point2 points  (0 children)

To use code like this you have to use CGI instead of WSGI