Subject: | _userpass for http[s] |
a username and a password is valid in an HTTP uri. It can be used for basic authentication.
I found I needed it because our product will be using URIs for all file resources, with a wrapper that deals with remote files, making a file's physical location transparent to the calling routine. Anyways, we needed a way to store the authentication info, and I thought in the URI was the smartest place.
--- http_old.pm 2003-03-30 23:40:48.000000000 -0500
+++ http.pm 2003-11-06 17:21:16.668425600 -0500
@@ -1,13 +1,17 @@
package URI::http;
require URI::_server;
-@ISA=qw(URI::_server);
+require URI::_userpass;
+@ISA=qw(URI::_server URI::_userpass);
use strict;
use vars qw(%unreserved_escape);
sub default_port { 80 }
+sub _user { shift->SUPER::user(@_); }
+sub _password { shift->SUPER::password(@_); }
+
sub canonical
{
my $self = shift;