[Lazarus] fcl-web deleted headers?
Ludo Brands
ludo.brands at free.fr
Fri Mar 28 08:09:40 CET 2014
On 03/27/2014 10:57 PM, Michael Van Canneyt wrote:
>
>
> On Thu, 27 Mar 2014, Leonardo M. Ramé wrote:
>
>> Hi, I'm sending a custom header I called "Filename" to a Brook CGI
>> (which uses TRequest from fcl-web) but I can't access that header.
>
> To my knowledge, the CGI protocol doesn't support the use of custom
> headers.
>
AFAIK, the CGI protocol doesn't specify anything regarding custom
headers. It only specifies mandatory variables but leaves custom headers
to the webserver implementation. Apache forwards most headers in
environment variables (http://httpd.apache.org/docs/trunk/env.html).
But, CustCgi only reads a set of known variables listed in CgiVarNames.
Can you try
HTTPDecode(GetEnvironmentVariable('Filename'));
to get your custom header?
A good practice is to start your custom headers with 'X-YourAPP-'.
Headers starting with 'X-' are in a lot of implementations considered as
application specific headers and not touched by transport agents.
Ludo
More information about the Lazarus
mailing list