How to tell GET from POST method ni CGI.pm?

How to tell GET from POST method ni CGI.pm?

am 15.05.2011 17:02:40 von Igor Chudov

--20cf3071c8dee803c904a351d6a8
Content-Type: text/plain; charset=ISO-8859-1

I am beginning to work on hardening my website against cross site request
forgeries. I use CGI.pm.

My question is, how can I tell, using CGI.pm, if this webpage was invoked
with a GET or POST method?

Thanks

--20cf3071c8dee803c904a351d6a8
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I am beginning to work on hardening my website against cross site request f=
orgeries. I use CGI.pm.=A0


My question is, how can I tel=
l, using CGI.pm, =A0if this webpage was invoked with a GET or POST method?<=
/div>


Thanks


--20cf3071c8dee803c904a351d6a8--

Re: How to tell GET from POST method ni CGI.pm?

am 15.05.2011 19:03:45 von Randolf Richardson

> I am beginning to work on hardening my website against cross site request
> forgeries. I use CGI.pm.
>
> My question is, how can I tell, using CGI.pm, if this webpage was invoked
> with a GET or POST method?

You're probably intersted in: $q->request_method

It should also be available in an environment variable of the same
name: $ENV{'REQUEST_METHOD'}

Randolf Richardson - randolf@inter-corporate.com
Inter-Corporate Computer & Network Services, Inc.
Vancouver, British Columbia, Canada
http://www.inter-corporate.com