Skip to navigation
Rust cgi request headers
03.09.23
rust cgi request headers ```rust cgi::handle(|req: cgi::Request| -> cgi::Response { let h = req.headers(); let b = req.body(); for i in h { println!("{:?}", &i); } ``` #result ```txt ccept-language", "en-US,en;q=0.5") ("connection", "keep-alive") ("sec-fetch-user", "?1") ("user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0") ("origin", "http://127.0.0.1") ("content-length", "94") ("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8") ("upgrade-insecure-requests", "1") ("sec-fetch-dest", "document") ("referer", "http://127.0.0.1/contact.html") ("accept-encoding", "gzip, deflate, br") ("sec-fetch-site", "same-origin") ("sec-fetch-mode", "navigate") ("host", "127.0.0.1") ("x-cgi-content-length", "94") ("x-cgi-content-type", "application/x-www-form-urlencoded") ("x-cgi-gateway-interface", "CGI/1.1") ("x-cgi-query-string", "") ("x-cgi-remote-addr", "172.19.0.1") ("x-cgi-request-method", "POST") ("x-cgi-script-name", "/email.cgi") ("x-cgi-server-port", "80") ("x-cgi-server-protocol", "HTTP/1.1") ("x-cgi-server-software", "lighttpd/1.4.69") Status: 200 OK content-length: 6 content-type: text/plain; charset=utf-8 ```
https://docs.rs/cgi/0.6.0/cgi/
Reply
Anonymous
Information Epoch 1732409440
Your system is just a path for moving data along.
Home
Notebook
Contact us