http auth

Pavel Kolesnikov k na les.cz
Středa Červenec 14 13:42:46 MEST 1999


Martin Povolny <xpovolny na aurora.fi.muni.cz> wrote:

> Nevite jak by slo nejak --jednoduse-- (v perlu)
> prinutit cgi-scriptem apache abu poslal neco jako

> print 'Date: Wed, 14 Jul 1999 09:09:13 GMT'."\n";
> print 'Server: Apache/1.3.4 (Unix) mod_czech/3.1.0b4 PHP/3.0.7'."\n";
> print 'WWW-Authenticate: Basic realm="Statistiky"'."\n";
> print 'HTTP/1.0 401 Auth Required'."\n";
> print 'Vary: User-Agent, Accept-Charset'."\n";

To je otazka specificka spis pro CGI obecne nez pro perl.
Spravne byste mel zacit takto:

print 'Status: 401 Auth Required'."\n";
print 'WWW-Authenticate: Basic realm="Statistiky"'."\n";
...

(teda jeste spravneji by bylo misto "\n" pouzivat
"\r\n", ale to uz je jen detail)

  Pavel



Další informace o konferenci Perl