Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
Articles by harsh manvar
1 articles
How to read all HTTP headers in Python CGI script?
When working with Python CGI scripts, you often need to access HTTP headers sent by the client. Apache's mod_cgi automatically converts HTTP headers into environment variables with an HTTP_ prefix. How Apache Handles HTTP Headers Apache's mod_cgi sets environment variables for each HTTP request header received. The variables follow a specific pattern: All header names get an HTTP_ prefix Header names are converted to uppercase Hyphens are replaced with underscores For example, x-client-version: 1.2.3 becomes HTTP_X_CLIENT_VERSION. Reading a Specific Header To read a specific custom header, use os.environ with the converted header ...
Read MoreShowing 1–1 of 1 articles
« Prev
1
Next »
Advertisements