Re: Getting request headers (sent by the browser)

Udo Schroeter <[email protected]> Sun, 17 Mar 2013 02:34:12 +0100
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <CAEQYpbykjDh_ypv+ZW3JjMNTsJm1NM7Xxv9vEQJcKXGR52=nvQ@mail.gmail.com>
--===============1921894706100806592==
Content-Type: multipart/alternative; boundary=f46d0434bfea9881dd04d814de9d

--f46d0434bfea9881dd04d814de9d
Content-Type: text/plain; charset=UTF-8

Thanks Rob,

you're totally right, my test case just didn't work correctly. It's all
there...
Thank you very much for your help!

Cheers,

Udo


On Sun, Mar 17, 2013 at 12:11 AM, Rob Lemley <rclemley-/[email protected]> wrote:

> I don't know how it's exposed in the java interface, but in the c++
> interface, the headers are available as CGI environment variables in the
> char** FCGX_Request.envp variable.  As I recall, all of the HTTP header
> names in the table will have "HTTP_" prepended, and all dashes (-) will
> appear as underscores  (_) in the FCGX_Request.envp table.
>
>
>   ------------------------------
> *From:* Udo Schroeter <[email protected]>
> *To:* fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
> *Sent:* Saturday, March 16, 2013 11:21 AM
> *Subject:* [FASTCGI] Getting request headers (sent by the browser)
>
> Hey all,
>
> I'm using the Java reference implementation from fastcgi.com. What I
> can't figure out (neither from the white paper nor from looking at the code
> itself) is:
>
> How can I get at the actual header variables sent by the browser to the
> webserver? From what I can tell they're not in the input stream...
>
> I'm sorry if I missed something obvious, but I'm stuck and a little hint
> would be greatly appreciated.
>
> Thanks,
>
> Udo
>
> _______________________________________________
> FastCGI-developers mailing list
> FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
> http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers
>
>
>

--f46d0434bfea9881dd04d814de9d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks Rob,<div><br></div><div>you&#39;re totally right, m=
y test case just didn&#39;t work correctly. It&#39;s all there...</div><div=
 style>Thank you very much for your help!</div><div style><br></div><div st=
yle>
Cheers,</div><div style><br></div><div style>Udo</div></div><div class=3D"g=
mail_extra"><br><br><div class=3D"gmail_quote">On Sun, Mar 17, 2013 at 12:1=
1 AM, Rob Lemley <span dir=3D"ltr">&lt;<a href=3D"mailto:rclemley-/[email protected]=
" target=3D"_blank">rclemley-/[email protected]</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div><div style=3D"font-size:10pt;font-famil=
y:arial,helvetica,sans-serif">I don&#39;t know how it&#39;s exposed in the =
java interface, but in the c++ interface, the headers are available as CGI =
environment variables in the char** FCGX_Request.envp variable.=C2=A0 As I =
recall, all of the HTTP header names in the table will have &quot;HTTP_&quo=
t; prepended, and all dashes (-) will appear as underscores=C2=A0 (_) in th=
e FCGX_Request.envp table.<br>
<div><span><br></span></div><div><br><blockquote style=3D"border-left:2px s=
olid rgb(16,16,255);margin-left:5px;margin-top:5px;padding-left:5px">  <div=
 style=3D"font-family:arial,helvetica,sans-serif;font-size:10pt"> <div styl=
e=3D"font-family:times new roman,new york,times,serif;font-size:12pt">
 <div dir=3D"ltr"> <font face=3D"Arial"> <hr size=3D"1">  <b><span style=3D=
"font-weight:bold">From:</span></b> Udo Schroeter &lt;<a href=3D"mailto:udo=
[email protected]" target=3D"_blank">[email protected]</a>&gt;<br>=
 <b><span style=3D"font-weight:bold">To:</span></b> <a href=3D"mailto:fastc=
[email protected]" target=3D"_blank">fastcgi-developers@mai=
lman.fastcgi.com</a> <br>
 <b><span style=3D"font-weight:bold">Sent:</span></b> Saturday, March 16, 2=
013 11:21 AM<br> <b><span style=3D"font-weight:bold">Subject:</span></b> [F=
ASTCGI] Getting request headers (sent by the browser)<br> </font> </div><di=
v>
<div class=3D"h5"> <br><div><div dir=3D"ltr">Hey all,<div><br></div><div><d=
iv style=3D"font-family:arial,sans-serif;font-size:13px">I&#39;m using the =
Java reference implementation from <a rel=3D"nofollow" href=3D"http://fastc=
gi.com/" target=3D"_blank">fastcgi.com</a>. What I can&#39;t figure out (ne=
ither from the white paper nor from looking at the code itself) is:</div>

<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">How can I get at the a=
ctual header variables sent by the browser to the webserver? From what I ca=
n tell they&#39;re not in the input stream...</div>

<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">I&#39;m sorry if I mis=
sed something obvious, but I&#39;m stuck and a little hint would be greatly=
 appreciated.</div>

<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">Thanks,</div><div styl=
e=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div style=3D"f=
ont-family:arial,sans-serif;font-size:13px">

Udo</div></div></div>
</div><br></div></div>_______________________________________________<br>Fa=
stCGI-developers mailing list<br><a href=3D"mailto:FastCGI-developers@mailm=
an.fastcgi.com" target=3D"_blank">FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org</a=
><br>
<a href=3D"http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers" =
target=3D"_blank">http://mailman.fastcgi.com/mailman/listinfo/fastcgi-devel=
opers</a><br><br><br> </div> </div> </blockquote></div>   </div></div></blo=
ckquote>
</div><br></div>

--f46d0434bfea9881dd04d814de9d--

--===============1921894706100806592==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers

--===============1921894706100806592==--