[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: busybox httpd: how to get http header from CGI
From:       Tim Tassonis <stuff () decentral ! ch>
Date:       2019-07-03 15:30:44
Message-ID: e221a6b0-ed39-a25c-6a06-c88c952f88c6 () decentral ! ch
[Download RAW message or body]

On 7/3/19 3:07 PM, nick83ola wrote:
> Hi all,
> there's a way for a cgi script to get the HTTP header of the request?
> in particular I get a jwt token into the request and i want to be able
> to validate it

most http headers are stored as environment variables starting with 
HTTP_ for the script (except the authentication header, for securitry 
reasons).

So, it's best to dumo the environment in your script to the screen or to 
a file first and then have a look what's around and how it is  named.


A simple test shell script would be:


#!/bin/sh
printf "Content-type: text/plain\n\n"
set
exit 0




Bye
Tim
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic