/usr/share/perl5/Net/UPnP/HTTPResponse.pm is in libnet-upnp-perl 1.4.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | package Net::UPnP::HTTPResponse;
#-----------------------------------------------------------------
# Net::UPnP::HTTPResponse
#-----------------------------------------------------------------
use strict;
use warnings;
use vars qw($_STATUS $_HEADER $_CONTENT);
$_STATUS = 'status';
$_HEADER = 'header';
$_CONTENT = 'content';
#------------------------------
# new
#------------------------------
sub new {
my($class) = shift;
my($this) = {
$Net::UPnP::HTTPResponse::_STATUS => '',
$Net::UPnP::HTTPResponse::_HEADER => '',
$Net::UPnP::HTTPResponse::_CONTENT => '',
};
bless $this, $class;
}
#------------------------------
# status
#------------------------------
sub setstatus() {
my($this) = shift;
$this->{$Net::UPnP::HTTPResponse::_STATUS} = $_[0];
}
sub getstatus() {
my($this) = shift;
$this->{$Net::UPnP::HTTPResponse::_STATUS};
}
sub getstatuscode() {
my($this) = shift;
my($status) = $this->{$Net::UPnP::HTTPResponse::_STATUS};
if (length($status) <= 0) {
return 0;
}
if($status =~ m/^HTTP\/\d.\d\s+(\d+)\s+.*/i ) {
return $1;
}
return 0;
}
#------------------------------
# header
#------------------------------
sub setheader() {
my($this) = shift;
$this->{$Net::UPnP::HTTPResponse::_HEADER} = $_[0];
}
sub getheader() {
my($this) = shift;
$this->{$Net::UPnP::HTTPResponse::_HEADER};
}
#------------------------------
# content
#------------------------------
sub setcontent() {
my($this) = shift;
$this->{$Net::UPnP::HTTPResponse::_CONTENT} = $_[0];
}
sub getcontent() {
my($this) = shift;
$this->{$Net::UPnP::HTTPResponse::_CONTENT};
}
1;
__END__
=head1 NAME
Net::UPnP::HTTPResponse - Perl extension for UPnP.
=head1 DESCRIPTION
The package is a inside module.
=head1 AUTHOR
Satoshi Konno
skonno@cybergarage.org
CyberGarage
http://www.cybergarage.org
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2005 by Satoshi Konno
It may be used, redistributed, and/or modified under the terms of BSD License.
=cut
|