Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

phpmyadmin fehler rechte unerlaubte mischung, WWWXXXApc, lilo trying to map files from unnamed device 0x0000", Wwwxxxapc, CAM::PDF::Renderer::TextF Fragen, adodb.recordset error '800a0cc1', php save mails as eml, WWWXXXAPC, sqlexpress database file auto-creation error, sqlexpress database file auto-creation error

Links

XODOX
Impressum
Datenschutz

#1: Determine http or https in CGI perl

Posted on 2011-10-04 08:04:16 by Ramprasad Prasad

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

In my cgi program .. I want to know if the user is accessing via HTTP or
HTTPS.

How can I do this ?

--
Thanks
Ram
<http://www.netcore.co.in/>




n <http://pragatee.com>

--bcaec52163238b750c04ae72dce2--

Report this message

#2: Re: Determine http or https in CGI perl

Posted on 2011-10-04 08:36:24 by Shlomi Fish

Hi Ram,

On Tue, 4 Oct 2011 11:34:16 +0530
Ramprasad Prasad <ramprasad.ap@gmail.com> wrote:

> In my cgi program .. I want to know if the user is accessing via HTTP or
> HTTPS.
>=20
> How can I do this ?
>=20

A quick Google search yielded this link:

http://stackoverflow.com/questions/5223341/how-do-i-identify -the-protocol-h=
ttp-vs-https-using-perls-cgi-pm

Here's a shorter link:

http://stackoverflow.com/questions/5223341

Reading from there, one option would be:

my $is_secure =3D $cgi->request_uri =3D~ m{^https://};

And a better one is:

[QUOTE]
CGI.pm has an https() method that, according to the documentation:

operates on the HTTPS environment variables present when the SSL protoc=
ol is in effect. Can be used to determine whether SSL is turned on.

This is probably what you're looking for. Without parameters, it returns a =
list of HTTPS environment variables.
[/QUOTE]

Regards,

Shlomi Fish

--=20
------------------------------------------------------------ -----
Shlomi Fish http://www.shlomifish.org/
What does "Zionism" mean? - http://shlom.in/def-zionism

â€=9CI simply hate, detest, loathe, despise, and abhor redundancy.=E2=
€
â€=94 http://uncyclopedia.org/wiki/Redundancy

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Report this message