Manipulating HTTP Headers

This is a multi-part message in MIME format.

--===============1620730195==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0031_01C74CD8.524F15B0"

This is a multi-part message in MIME format.

------=_NextPart_000_0031_01C74CD8.524F15B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi All,

I need to write some function to authenticate a visitor using HTTP =
Authentication, matching his login information with another server. =
Here's the idea more clear:

1. A visitor enters www.myserver.com
2. He gets on his screen the user/password HTTP Authentication window =
and tries to login
3. The script should take the provided login information and send it to =
www.anotherserver.com just to check if an authentication success can be =
done using that login information.
4. The script then grants or deny access to the user, based on point 3.

I know how to match the login information using LWP::UserAgent, but i =
can't find the way to force Apache to send a controlled 401 response or =
a way to make the user's browser open the HTTP Authentication window. =
Also, i can't find a way to catch the login information to process it =
and let Perl decide if it is a success login or not.

If it's worth for something, i'm using Apache 2.2 with mod_perl 2.0 and =
Perl 5.8.

Please, if someone can help me understanding how to accomplish this =
task, i'll really appreciate it.

Thank you! :-)

Paco


------=_NextPart_000_0031_01C74CD8.524F15B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.5730.11" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi All,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I need to write some function to =
authenticate a
visitor using HTTP Authentication, matching his login information with =
another
server. Here's the idea more clear:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>1. A visitor enters <A
href=3D"http://www.myserver.com">www.myserver.com</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. He gets on his screen the =
user/password HTTP
Authentication window and tries to login</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>3. The script should take the provided =
login
information and send it to <A
href=3D"http://www.anotherserver.com">www.anotherserver.com</A> just to =
check if
an authentication success can be done using that login =
information.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4. The script then grants or deny =
access to the
user, based on point 3.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I know how to match the login =
information using
LWP::UserAgent, but i can't find the way to force Apache to send a =
controlled
401 response or a way to make the user's browser open the HTTP =
Authentication
window. Also, i can't find a way to catch the login information to =
process it
and let Perl decide if it is a success login or not.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>If it's worth for something, =
i'm using
Apache 2.2 with mod_perl 2.0 and Perl 5.8.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Please, if someone can help me =
understanding how to
accomplish this task, i'll really appreciate it.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you! :-)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Paco</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>

------=_NextPart_000_0031_01C74CD8.524F15B0--


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

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1620730195==--
fzarabozo [ Sa, 10 Februar 2007 12:57 ] [ ID #1625334 ]

Re: Manipulating HTTP Headers

--===============0714155934==
Content-Type: multipart/alternative; boundary="0-218234798-1171144399=:77268"
Content-Transfer-Encoding: 7bit

--0-218234798-1171144399=:77268
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Paco,

Grab http-sniffer.pl by Tim Meadowcroft so you can see the actual headers=
:

http://schmerg.pwp.blueyonder.co.uk/code.htm

then look over rfc 2617 to decide if you want to use basic or digest auth=
entication.

There are many perl examples for doing this in cgi perl -- google for the=
m.

good luck,
Mark


---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
--0-218234798-1171144399=:77268
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Paco,<br><br>Grab http-sniffer.pl by Tim Meadowcroft so you can see the a=
ctual headers:<br><br><a href=3D"http://schmerg.pwp.blueyonder.co.uk/code=
..htm">http://schmerg.pwp.blueyonder.co.uk/code.htm</a><br><br>then look o=
ver rfc 2617 to decide if you want to use basic or digest authentication.=
<br><br>There are many perl examples for doing this in cgi perl -- google=
for them.<br><br>good luck,<br>Mark<br><p>

<hr size=3D1>It's here! Your new message!<br>Get
<a href=3D"http://us.rd.yahoo.com/evt=3D49938/*http://tools.search.yahoo.=
com/toolbar/features/mail/"> new email alerts</a> with the free <a href=3D=
"
http://us.rd.yahoo.com/evt=3D49938/*http://tools.search.yaho o.com/toolbar=
/features/mail/">Yahoo! Toolbar.</a>
--0-218234798-1171144399=:77268--

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

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0714155934==--
gnu valued customer [ Sa, 10 Februar 2007 22:53 ] [ ID #1625335 ]

script to generate a simple chart

This is a multi-part message in MIME format.

--===============1106672872==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000C_01C74D4B.80E6BE00"

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C74D4B.80E6BE00
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello all,



I am thinking to write a simple (!) script in perl to generate a chart
joining objects. Very much like a flow chart. Has anyone done this before?
Is it possible?



O1

|

|

|

O3<-------------- O---------------> O2



and more objects..





How do we do this?



Thank you.

Rajeev


------=_NextPart_000_000C_01C74D4B.80E6BE00
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{margin-right:0in;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{font-family:Arial;
color:navy;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dblue>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Hello all,</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>I am thinking to write a simple (!) =
script
in perl to generate a chart joining objects. Very much like a flow =
chart. Has anyone
done this before? Is it possible?</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>      =
            &=
nbsp;    
O1</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>      =
            &=
nbsp;    
|</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>      =
            &=
nbsp;    
|</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>      =
            &=
nbsp;    
|</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>O3</span></font><font size=3D2 =
color=3Dnavy
face=3DWingdings><span =
style=3D'font-size:10.0pt;font-family:Wingdings;color:navy'> ß</span=
></font><font
size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;
color:navy'>------------ O-------------</span></font><font size=3D2 =
color=3Dnavy
face=3DWingdings><span =
style=3D'font-size:10.0pt;font-family:Wingdings;color:navy'> à</spa=
n></font><font
size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;
color:navy'> O2</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>…and more =
objects….</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>How do we do =
this?</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Thank you.</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Rajeev</span></font></p>

</div>

</body>

</html>

------=_NextPart_000_000C_01C74D4B.80E6BE00--


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

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1106672872==--
Rajeev Prasad [ So, 11 Februar 2007 02:41 ] [ ID #1625848 ]
Perl » gmane.comp.lang.perl.active-perl » Manipulating HTTP Headers

Vorheriges Thema: RE: ActivePerl Digest, Vol 7, Issue 8
Nächstes Thema: Re: [RR] RE: Does perlapp have a problem with C:\Temp not there in