The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Build.PL 018
Changes 213
MANIFEST 1213
META.json 042
META.yml 1222
Makefile.PL 914
README 00
lib/Net/UPnP/AV/MediaServer.pm 234
lib/Net/UPnP/HTTP.pm 116
lib/Net/UPnP.pm 11
t/UPnP.t 00
11 files changed (This is a version diff) 39173
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Module::Build;
+
+my $builder = Module::Build->new(
+    module_name         => 'Net::UPnP',
+    license             => 'bsd',
+    dist_author         => 'Satoshi Konno <skonno@cybergarage.org>',
+    dist_version_from   => 'lib/Net/UPnP.pm',
+    abstract_from_from  => 'lib/Net/UPnP.pm',
+    requires => {
+        'Test::More' => 0,
+        'version'    => 0,
+    },
+    add_to_cleanup      => [ 'Net-UPnP-*' ],
+);
+
+$builder->create_build_script();
@@ -1,7 +1,18 @@
 Revision history for Perl extension UPnP.
 
-2008-10-15 Satoshi Konno <skonno@cybergarage.org>
-	* v1.2.4
+2014-10-16 Satoshi Konno <skonno@cybergarage.org>
+	* v1.4.3
+	* Added Build.PL for Module::Build.
+	* Updated MANIFEST and Makefile.PL.
+
+2013-12-27 Thomas Liske <thomas at fiasko-nw.net>
+	* Implement handling of chunked "Transfer-Encoding".
+
+2010-08-07 Satoshi Konno <skonno@cybergarage.org>
+	* Changed UPnP::AV::MediaServer::getcontentlist() to get contents from non standard UPnP/AV media servers.
+
+2009-07-27 Satoshi Konno <skonno@cybergarage.org>
+	* v1.4.2
 	* Added Net::UPnP::SetDebug().
 	* Fixed Net:UPnP::ControlPoint::search() not to use uninitialize value on the debug mode.
 	* Added two examples, upnpchk.pl and upnpavchk.pl, to check UPnP and UPnP/AV devices.
@@ -1,3 +1,4 @@
+Build.PL
 Changes
 examples/upnpdump.pl
 examples/upnpchk.pl
@@ -8,22 +9,22 @@ examples/dms2vodcast.pl
 examples/upnpgwdump.pl
 examples/upnpgwtool.pl
 lib/Net/UPnP.pm
-lib/Net/UPnP/AV
-lib/Net/UPnP/AV/Container.pm
-lib/Net/UPnP/AV/Content.pm
-lib/Net/UPnP/AV/Item.pm
-lib/Net/UPnP/AV/MediaRenderer.pm
-lib/Net/UPnP/AV/MediaServer.pm
-lib/Net/UPnP/ActionResponse.pm
-lib/Net/UPnP/ControlPoint.pm
 lib/Net/UPnP/Device.pm
+lib/Net/UPnP/Service.pm
 lib/Net/UPnP/GW/Gateway.pm
-lib/Net/UPnP/HTTP.pm
+lib/Net/UPnP/ControlPoint.pm
+lib/Net/UPnP/AV/MediaServer.pm
+lib/Net/UPnP/AV/Container.pm
+lib/Net/UPnP/AV/MediaRenderer.pm
+lib/Net/UPnP/AV/Item.pm
+lib/Net/UPnP/AV/Content.pm
 lib/Net/UPnP/HTTPResponse.pm
+lib/Net/UPnP/HTTP.pm
 lib/Net/UPnP/QueryResponse.pm
-lib/Net/UPnP/Service.pm
+lib/Net/UPnP/ActionResponse.pm
 Makefile.PL
-MANIFEST			This list of files
+MANIFEST
 README
 t/UPnP.t
-META.yml            Module meta-data (added by MakeMaker)
+META.yml
+META.json
@@ -0,0 +1,42 @@
+{
+   "abstract" : "Perl extension for UPnP",
+   "author" : [
+      "Satoshi Konno <skonno@cybergarage.org>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120921",
+   "license" : [
+      "unknown"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+      "version" : "2"
+   },
+   "name" : "Net-UPnP",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "Test::More" : "0",
+            "version" : "0"
+         }
+      }
+   },
+   "release_status" : "stable",
+   "version" : "v1.4.3"
+}
@@ -1,13 +1,23 @@
---- #YAML:1.0
-name:                Net-UPnP
-version:             1.4.2
-abstract:            Perl extension for UPnP
-license:             ~
-author:              
-    - skonno <skonno@cybergarage.org>
-generated_by:        ExtUtils::MakeMaker version 6.44
-distribution_type:   module
-requires:     
+---
+abstract: 'Perl extension for UPnP'
+author:
+  - 'Satoshi Konno <skonno@cybergarage.org>'
+build_requires:
+  ExtUtils::MakeMaker: 0
+configure_requires:
+  ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120921'
+license: unknown
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
-    version: 1.3
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: Net-UPnP
+no_index:
+  directory:
+    - t
+    - inc
+requires:
+  Test::More: 0
+  version: 0
+version: v1.4.3
@@ -1,12 +1,17 @@
-use 5.008;
+use strict;
+use warnings;
 use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
+
 WriteMakefile(
-    NAME              => 'Net::UPnP',
-    VERSION_FROM      => 'lib/Net/UPnP.pm', # finds $VERSION
-    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
-    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
-      (ABSTRACT_FROM  => 'lib/Net/UPnP.pm', # retrieve abstract from module
-       AUTHOR         => 'skonno <skonno@cybergarage.org>') : ()),
+    NAME                => 'Net::UPnP',
+    AUTHOR              => 'Satoshi Konno <skonno@cybergarage.org>',
+    VERSION_FROM        => 'lib/Net/UPnP.pm',
+    ABSTRACT_FROM       => 'lib/Net/UPnP.pm',
+    PL_FILES            => {},
+    PREREQ_PM => {
+        'Test::More' => 0,
+        'version'    => 0,
+    },
+    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+    clean               => { FILES => 'Net-UPnP-*' },
 );
diff --git a/var/tmp/source/SKONNO/Net-UPnP-1.4.2/Net-UPnP-1.4.2/README b/var/tmp/source/SKONNO/Net-UPnP-1.4.3/Net-UPnP-1.4.3/README
old mode 100755
new mode 100644
@@ -149,6 +149,9 @@ sub getcontentlist {
 		$content,
 		$container,
 		$item,
+		$numberReturned,
+		$requestedCount,
+		$totalMatches
 	);
 	
 	@content_list = ();
@@ -159,8 +162,37 @@ sub getcontentlist {
 			RequestedCount => $args{RequestedCount},
 			SortCriteria => $args{SortCriteria}
 			);
-	if ($action_res->getstatuscode() != 200) {
-		return @content_list;
+	$numberReturned = 0;
+	if ($action_res->getstatuscode() == 200) {
+		$arg_list = $action_res->getargumentlist();
+		$numberReturned = int($arg_list->{'NumberReturned'});
+	}
+	if ($numberReturned <= 0) {
+		$action_res = $this-> browsemetadata(
+				ObjectID => $args{ObjectID},
+				Filter => $args{Filter},
+				StartingIndex => $args{StartingIndex},
+				RequestedCount => $args{RequestedCount},
+				SortCriteria => $args{SortCriteria}
+			);
+		$requestedCount = 999;
+		if ($action_res->getstatuscode() == 200) {
+			$arg_list = $action_res->getargumentlist();
+			$totalMatches = int($arg_list->{'TotalMatches'});
+			if (1 < $totalMatches) {
+				$requestedCount = $totalMatches;
+			}
+		}
+		$action_res = $this->browsedirectchildren(
+				ObjectID => $args{ObjectID},
+				Filter => $args{Filter},
+				StartingIndex => $args{StartingIndex},
+				RequestedCount => $requestedCount,
+				SortCriteria => $args{SortCriteria}
+			);
+		if ($action_res->getstatuscode() != 200) {
+			return @content_list;
+		}
 	}
 	$arg_list = $action_res->getargumentlist();
 	unless ($arg_list->{'Result'}) {
@@ -112,9 +112,24 @@ REQUEST_HEADER
 	if($res_header =~ m/^Content-Length[: ]*(\d+)/i ) {
 		$res_content_len = $1
 	}
+
+	my $res_chunked = 0;
+	if($res_header =~ m/^Transfer-Encoding[: ]*chunked/im ) {
+		$res_chunked = 1;
+	}
 	
 	$res_content = "";
-	if ($res_content_len) {
+	if ($res_chunked) {
+		while(<HTTP_SOCK>) {
+			s/[\r\n]//g;
+			my $length = hex($_);
+			my $chunk;
+
+			read(HTTP_SOCK, $chunk, $length);
+			$res_content .= $chunk;
+		}
+	}
+	elsif ($res_content_len) {
 		read(HTTP_SOCK, $res_content, $res_content_len);
 	}
 	else {
@@ -11,7 +11,7 @@ use warnings;
 use vars qw($VERSION $DEBUG $SSDP_ADDR $SSDP_PORT);
 
 
-$VERSION  = '1.4.2';
+$VERSION  = '1.4.3';
 $DEBUG = 0;
 
 $SSDP_ADDR = '239.255.255.250';
diff --git a/var/tmp/source/SKONNO/Net-UPnP-1.4.2/Net-UPnP-1.4.2/t/UPnP.t b/var/tmp/source/SKONNO/Net-UPnP-1.4.3/Net-UPnP-1.4.3/t/UPnP.t
old mode 100755
new mode 100644