[libhttp-daemon-ssl-perl] 02/07: Import Upstream version 1.04

Mike Gabriel sunweaver at debian.org
Mon Sep 18 16:02:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository libhttp-daemon-ssl-perl.

commit b752682d6378a5900cd9915c5b45af07f6176549
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Sep 18 18:00:17 2017 +0200

    Import Upstream version 1.04
---
 BUGS                                               |  6 +-
 Changes                                            | 17 +++++-
 META.yml                                           |  3 +-
 README                                             | 23 ++++++++
 SSL.pm                                             | 45 ++++-----------
 certs/.svn/all-wcprops                             | 23 ++++++++
 certs/.svn/entries                                 | 67 ++++++++++++++++++++++
 certs/.svn/format                                  |  1 +
 certs/.svn/prop-base/server-cert.pem.svn-base      |  9 +++
 certs/.svn/prop-base/server-key.pem.svn-base       |  9 +++
 certs/.svn/prop-base/test-ca.pem.svn-base          |  9 +++
 certs/.svn/text-base/server-cert.pem.svn-base      | 44 ++++++++++++++
 certs/.svn/text-base/server-key.pem.svn-base       |  9 +++
 certs/.svn/text-base/test-ca.pem.svn-base          | 21 +++++++
 t/.svn/all-wcprops                                 | 23 ++++++++
 t/.svn/entries                                     | 67 ++++++++++++++++++++++
 t/.svn/format                                      |  1 +
 t/.svn/prop-base/loadmodule.t.svn-base             |  9 +++
 t/.svn/prop-base/ssl_settings.req.svn-base         |  9 +++
 t/.svn/prop-base/testmodule.t.svn-base             |  9 +++
 t/.svn/text-base/loadmodule.t.svn-base             | 21 +++++++
 t/.svn/text-base/ssl_settings.req.svn-base         |  4 ++
 .../text-base/testmodule.t.svn-base}               | 24 +++++---
 t/testmodule.t                                     | 24 +++++---
 24 files changed, 420 insertions(+), 57 deletions(-)

diff --git a/BUGS b/BUGS
index 65a6b50..8877d28 100644
--- a/BUGS
+++ b/BUGS
@@ -1,4 +1,4 @@
-None known for this release.
+Authoritative bug list is on rt.cpan.org:
+
+http://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Daemon-SSL
 
--- 
-Peter Behroozi (behrooz at fas.harvard.edu)
\ No newline at end of file
diff --git a/Changes b/Changes
index 5186d13..0425a42 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,18 @@
+v1.04
+    - production release
+    - only documentation and text file changes from 1.03_02
+
+v1.03_02
+    - removes unnecessary _need_more
+    - which, by side effect, fixes two outstanding bugs:
+      http://rt.cpan.org/Ticket/Display.html?id=21395
+      http://rt.cpan.org/Ticket/Display.html?id=15470
+
+v1.03_01
+    - First release by Mark Aufflick <mark at aufflick.com>
+    - Fixes problem where accep() will never timeout
+      http://rt.cpan.org/Ticket/Display.html?id=28417
+
 v1.02
 	- Async updates
 	- Documentation update to mention SSL certificates. (requested
@@ -14,4 +29,4 @@ v1.01  2003.7.27
 	  instead of IO::Socket::SSL.
 
 v1.00  2003.7.24
-	- Initial public release.
\ No newline at end of file
+	- Initial public release.
diff --git a/META.yml b/META.yml
index 4c61cb0..27a9f74 100644
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,6 @@
 # http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         HTTP-Daemon-SSL
-version:      1.02
+version:      1.04
 version_from: SSL.pm
 installdirs:  site
 license:      perl
diff --git a/README b/README
index b85af9d..3b713a2 100644
--- a/README
+++ b/README
@@ -1,3 +1,26 @@
+Quick note:
+
+I have just taken over maintenance of HTTP::Daemon::SSL. This
+release fixes various bugs:
+ * http://rt.cpan.org/Ticket/Display.html?id=28417
+ * http://rt.cpan.org/Ticket/Display.html?id=21395
+ * http://rt.cpan.org/Ticket/Display.html?id=15470
+
+The todo list, in no particular order, is:
+
+ * convert build system to Module::Build
+ * change tests to use Test::More
+ * improve test cases
+
+Latest versions are available on CPAN. My subversion repository is
+also available:
+
+  http://cvs.pumptheory.com/ (browse)
+  http://cvs.pumptheory.com/repos/ (repository)
+
+Mark Aufflick, <mark at aufflick.com>
+
+-------
 
 HTTP::Daemon::SSL is a descendant of HTTP::Daemon that uses SSL
 sockets (via IO::Socket::SSL) instead of cleartext sockets.  It
diff --git a/SSL.pm b/SSL.pm
index 97856ed..8f44e31 100644
--- a/SSL.pm
+++ b/SSL.pm
@@ -46,7 +46,8 @@ available.  In a scalar context the returned value will be a reference
 to a object of the I<HTTP::Daemon::ClientConn::SSL> class which is another
 I<IO::Socket::SSL> subclass.  In a list context a two-element array
 is returned containing the new I<HTTP::Daemon::ClientConn::SSL> reference
-and the peer address; the list will be empty upon failure.  Calling
+and the peer address; the list will be empty upon failure. (Note that version
+ 1.02 erroneously did not honour list context). Calling
 the get_request() method on the I<HTTP::Daemon::ClientConn::SSL> object
 will read data from the client and return an I<HTTP::Request> object
 reference.
@@ -71,7 +72,7 @@ use vars qw($VERSION @ISA $PROTO $DEBUG);
 use IO::Socket::SSL;
 use HTTP::Daemon;
 
-$VERSION = "1.02";
+$VERSION = "1.04";
 @ISA = qw(IO::Socket::SSL HTTP::Daemon);
 
 =item $d = new HTTP::Daemon::SSL
@@ -105,10 +106,13 @@ sub accept
 {
     my $self = shift;
     my $pkg = shift || "HTTP::Daemon::ClientConn::SSL";
-    while (1) {
-	my $sock = IO::Socket::SSL::accept($self,$pkg);
-	${*$sock}{'httpd_daemon'} = $self if ($sock);
-	return $sock if ($sock || $self->errstr =~ /^IO::Socket[^\n]* accept failed$/);
+	my ($sock, $peer) = IO::Socket::SSL::accept($self,$pkg);
+    if ($sock) {
+        ${*$sock}{'httpd_daemon'} = $self;
+        return wantarray ? ($sock, $peer) : $sock;
+    }
+    else {
+        return;
     }
 }
 
@@ -148,39 +152,14 @@ sub ssl_error {
     $self->kill_socket;
 }
 
+# we're not overriding any methods here, but we are inserting IO::Socket::SSL
+# into the message dispatch tree
 
 package HTTP::Daemon::ClientConn::SSL;
 use vars qw(@ISA $DEBUG);
 @ISA = qw(IO::Socket::SSL HTTP::Daemon::ClientConn);
 *DEBUG = \$HTTP::Daemon::DEBUG;
 
-sub _need_more
-{
-    my $self = shift;
-    if ($_[1]) {
-        my($timeout, $fdset) = @_[1,2];
-        print STDERR "select(,,,$timeout)\n" if $DEBUG;
-        my $n = select($fdset,undef,undef,$timeout);
-        unless ($n) {
-            $self->reason(defined($n) ? "Timeout" : "select: $!");
-            return;
-        }
-    }
-    my $total = 0;
-    while (1){
-        print STDERR sprintf("sysread() already %d\n",$total) if $DEBUG;
-        my $n = sysread($self, $_[0], 2048, length($_[0]));
-        print STDERR sprintf("sysread() just \$n=%s\n",(defined $n?$n:'undef')) if $DEBUG;
-        $total += $n if defined $n;
-        last if $! =~ 'Resource temporarily unavailable';
-            #SSL_Error because of aggressive reading
-
-        $self->reason(defined($n) ? "Client closed" : "sysread: $!") unless $n;
-        last unless $n;
-        last unless $n == 2048;
-    }
-    $total;
-}
 
 =head1 SEE ALSO
 
diff --git a/certs/.svn/all-wcprops b/certs/.svn/all-wcprops
new file mode 100644
index 0000000..937fc7e
--- /dev/null
+++ b/certs/.svn/all-wcprops
@@ -0,0 +1,23 @@
+K 25
+svn:wc:ra_dav:version-url
+V 57
+/repos/!svn/ver/354/tags/v1_04/perl/HTTP-Daemon-SSL/certs
+END
+test-ca.pem
+K 25
+svn:wc:ra_dav:version-url
+V 69
+/repos/!svn/ver/354/tags/v1_04/perl/HTTP-Daemon-SSL/certs/test-ca.pem
+END
+server-cert.pem
+K 25
+svn:wc:ra_dav:version-url
+V 73
+/repos/!svn/ver/354/tags/v1_04/perl/HTTP-Daemon-SSL/certs/server-cert.pem
+END
+server-key.pem
+K 25
+svn:wc:ra_dav:version-url
+V 72
+/repos/!svn/ver/354/tags/v1_04/perl/HTTP-Daemon-SSL/certs/server-key.pem
+END
diff --git a/certs/.svn/entries b/certs/.svn/entries
new file mode 100644
index 0000000..f93d99a
--- /dev/null
+++ b/certs/.svn/entries
@@ -0,0 +1,67 @@
+8
+
+dir
+354
+http://cvs.pumptheory.com/repos/tags/v1_04/perl/HTTP-Daemon-SSL/certs
+http://cvs.pumptheory.com/repos
+
+
+
+2007-07-23T11:12:43.000000Z
+340
+aufflick
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+e61f1579-d936-0410-a464-d4d27b584de8
+

+test-ca.pem
+file
+
+
+
+
+2007-11-24T05:44:09.000000Z
+ca744c4bd7570d64a222725775e93a9d
+2007-07-23T11:12:43.000000Z
+340
+aufflick
+has-props
+

+server-cert.pem
+file
+
+
+
+
+2007-11-24T05:44:09.000000Z
+8f9eedde3214037c20b4f61707025401
+2007-07-23T11:12:43.000000Z
+340
+aufflick
+has-props
+

+server-key.pem
+file
+
+
+
+
+2007-11-24T05:44:09.000000Z
+2e567e702ef3ddf834f9f2b3d6b1226f
+2007-07-23T11:12:43.000000Z
+340
+aufflick
+has-props
+

diff --git a/certs/.svn/format b/certs/.svn/format
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/certs/.svn/format
@@ -0,0 +1 @@
+8
diff --git a/certs/.svn/prop-base/server-cert.pem.svn-base b/certs/.svn/prop-base/server-cert.pem.svn-base
new file mode 100644
index 0000000..7b57b30
--- /dev/null
+++ b/certs/.svn/prop-base/server-cert.pem.svn-base
@@ -0,0 +1,9 @@
+K 13
+svn:eol-style
+V 6
+native
+K 12
+svn:keywords
+V 23
+Author Date Id Revision
+END
diff --git a/certs/.svn/prop-base/server-key.pem.svn-base b/certs/.svn/prop-base/server-key.pem.svn-base
new file mode 100644
index 0000000..7b57b30
--- /dev/null
+++ b/certs/.svn/prop-base/server-key.pem.svn-base
@@ -0,0 +1,9 @@
+K 13
+svn:eol-style
+V 6
+native
+K 12
+svn:keywords
+V 23
+Author Date Id Revision
+END
diff --git a/certs/.svn/prop-base/test-ca.pem.svn-base b/certs/.svn/prop-base/test-ca.pem.svn-base
new file mode 100644
index 0000000..7b57b30
--- /dev/null
+++ b/certs/.svn/prop-base/test-ca.pem.svn-base
@@ -0,0 +1,9 @@
+K 13
+svn:eol-style
+V 6
+native
+K 12
+svn:keywords
+V 23
+Author Date Id Revision
+END
diff --git a/certs/.svn/text-base/server-cert.pem.svn-base b/certs/.svn/text-base/server-cert.pem.svn-base
new file mode 100644
index 0000000..0fc5c24
--- /dev/null
+++ b/certs/.svn/text-base/server-cert.pem.svn-base
@@ -0,0 +1,44 @@
+Certificate:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 2 (0x2)
+        Signature Algorithm: md5WithRSAEncryption
+        Issuer: C=US, ST=Some-State, O=Dummy IO::Socket::SSL Certificate Authority, CN=Dummy IO::Socket::SSL Certificate Authority
+        Validity
+            Not Before: Jul 20 16:06:37 2002 GMT
+            Not After : Dec  5 16:06:37 2029 GMT
+        Subject: C=US, ST=Some-State, O=IO::Socket::SSL Dummy Server Certificate, CN=IO::Socket::SSL Dummy Server Certificate
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+            RSA Public Key: (512 bit)
+                Modulus (512 bit):
+                    00:9f:27:5f:4a:8a:35:4a:7f:3f:d1:80:25:96:26:
+                    0a:da:af:9a:6d:bc:23:ba:71:91:5b:40:d1:2d:2b:
+                    c8:60:2a:ef:e9:54:e5:a2:64:0a:57:90:35:bf:cd:
+                    b6:36:f3:25:53:68:65:2c:d8:d0:f9:b7:f3:7f:2e:
+                    f8:e2:3d:e0:dd
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: md5WithRSAEncryption
+        57:a7:2d:91:cc:e9:11:16:bb:c1:cd:b5:a5:e1:26:99:8f:ee:
+        8c:b0:2d:b6:54:f4:8a:8e:fd:8f:45:9a:68:d8:0e:ef:d6:a5:
+        38:6a:48:d0:08:da:a8:87:3c:70:05:18:69:a1:c8:ee:94:a7:
+        87:40:f5:4f:64:b4:b0:c6:d3:d2:ed:f9:cc:d1:fe:da:4d:99:
+        4d:22:02:f6:0e:9b:c0:cc:42:59:50:2f:5c:fc:5b:70:f9:0b:
+        ec:6e:5b:eb:d7:6f:a1:b8:67:57:b1:4f:99:bd:ad:03:9d:b5:
+        f3:44:5c:36:1c:fa:33:82:87:0b:99:aa:f5:39:5c:63:23:6b:
+        48:2d
+-----BEGIN CERTIFICATE-----
+MIICQzCCAawCAQIwDQYJKoZIhvcNAQEEBQAwgY4xCzAJBgNVBAYTAlVTMRMwEQYD
+VQQIEwpTb21lLVN0YXRlMTQwMgYDVQQKEytEdW1teSBJTzo6U29ja2V0OjpTU0wg
+Q2VydGlmaWNhdGUgQXV0aG9yaXR5MTQwMgYDVQQDEytEdW1teSBJTzo6U29ja2V0
+OjpTU0wgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTAyMDcyMDE2MDYzN1oXDTI5
+MTIwNTE2MDYzN1owgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRl
+MTEwLwYDVQQKEyhJTzo6U29ja2V0OjpTU0wgRHVtbXkgU2VydmVyIENlcnRpZmlj
+YXRlMTEwLwYDVQQDEyhJTzo6U29ja2V0OjpTU0wgRHVtbXkgU2VydmVyIENlcnRp
+ZmljYXRlMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ8nX0qKNUp/P9GAJZYmCtqv
+mm28I7pxkVtA0S0ryGAq7+lU5aJkCleQNb/NtjbzJVNoZSzY0Pm3838u+OI94N0C
+AwEAATANBgkqhkiG9w0BAQQFAAOBgQBXpy2RzOkRFrvBzbWl4SaZj+6MsC22VPSK
+jv2PRZpo2A7v1qU4akjQCNqohzxwBRhpocjulKeHQPVPZLSwxtPS7fnM0f7aTZlN
+IgL2DpvAzEJZUC9c/Ftw+Qvsblvr12+huGdXsU+Zva0DnbXzRFw2HPozgocLmar1
+OVxjI2tILQ==
+-----END CERTIFICATE-----
diff --git a/certs/.svn/text-base/server-key.pem.svn-base b/certs/.svn/text-base/server-key.pem.svn-base
new file mode 100644
index 0000000..b7a165f
--- /dev/null
+++ b/certs/.svn/text-base/server-key.pem.svn-base
@@ -0,0 +1,9 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBPAIBAAJBAJ8nX0qKNUp/P9GAJZYmCtqvmm28I7pxkVtA0S0ryGAq7+lU5aJk
+CleQNb/NtjbzJVNoZSzY0Pm3838u+OI94N0CAwEAAQJAf/DavcVVCco5t2TY0ldK
+qno4Hrb70cmyHDWC8lkb/5HAGbCGxpsstXxVKczRO201vcFUKm6PX5moUnFCINpg
+UQIhAM+ooHbD0eLL0K6limEnW7GId/+DFI/6KFXk2Nzm//XXAiEAxDQbWQvZS8DO
+HJ5JV8flvMhH30KLeH+zpsvBjWJK4GsCIQCUF7woNsquJZBznNctJjZ8S8jYThES
+BONTLluCXrNYDQIhAJFnsHDQqCxM6jMpV193pJnAsAsUbPpTYZeWX43hL26bAiEA
+jNB3PPNvTNr5tICkO/lMZcN87eUn4ZAtrNzCVF5ilEo=
+-----END RSA PRIVATE KEY-----
diff --git a/certs/.svn/text-base/test-ca.pem.svn-base b/certs/.svn/text-base/test-ca.pem.svn-base
new file mode 100644
index 0000000..36bf8e4
--- /dev/null
+++ b/certs/.svn/text-base/test-ca.pem.svn-base
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQQFADCBjjELMAkGA1UEBhMCVVMx
+EzARBgNVBAgTClNvbWUtU3RhdGUxNDAyBgNVBAoTK0R1bW15IElPOjpTb2NrZXQ6
+OlNTTCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxNDAyBgNVBAMTK0R1bW15IElPOjpT
+b2NrZXQ6OlNTTCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDIwNzIwMTYwNTU0
+WhcNMjkxMjA1MTYwNTU0WjCBjjELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUt
+U3RhdGUxNDAyBgNVBAoTK0R1bW15IElPOjpTb2NrZXQ6OlNTTCBDZXJ0aWZpY2F0
+ZSBBdXRob3JpdHkxNDAyBgNVBAMTK0R1bW15IElPOjpTb2NrZXQ6OlNTTCBDZXJ0
+aWZpY2F0ZSBBdXRob3JpdHkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALQm
+bgkEUWImNkjWcO6qn5NZ7rCFbtrzqEYbqciy+1qlWuoBgU44n9ykD1c/BcmBPsDT
+bIOfLzjcdJj38taXu7kcRclchJ+/c6o/SmDv7UqcL6QgVSZRvRrK7TDypMqe3sW8
+zCvTF8WtSsgFy5f9qlUdx4NowMzVV7OFl+6x4YlpAgMBAAGjge4wgeswHQYDVR0O
+BBYEFDU4SrHVMHDjd2kBgFM/qyC3DPxFMIG7BgNVHSMEgbMwgbCAFDU4SrHVMHDj
+d2kBgFM/qyC3DPxFoYGUpIGRMIGOMQswCQYDVQQGEwJVUzETMBEGA1UECBMKU29t
+ZS1TdGF0ZTE0MDIGA1UEChMrRHVtbXkgSU86OlNvY2tldDo6U1NMIENlcnRpZmlj
+YXRlIEF1dGhvcml0eTE0MDIGA1UEAxMrRHVtbXkgSU86OlNvY2tldDo6U1NMIENl
+cnRpZmljYXRlIEF1dGhvcml0eYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEB
+BAUAA4GBAIbCsK/qUXiIsRvg1ptaLNM6VsuR8ifNrmo9A4zk1h4OCixys6Hmoow6
+3MndnLpD3rh3UCYh0M20+fiHcwSmHZvBo3dfSSvYnH0gFSBjKp/wgGcb3Cvl3dRX
+aeWZGrKQKLI6DrHqAiSu9rv+2kfzgmRLt0K+gdb2GkQqCBwT8Gjr
+-----END CERTIFICATE-----
diff --git a/t/.svn/all-wcprops b/t/.svn/all-wcprops
new file mode 100644
index 0000000..eeddd0f
--- /dev/null
+++ b/t/.svn/all-wcprops
@@ -0,0 +1,23 @@
+K 25
+svn:wc:ra_dav:version-url
+V 53
+/repos/!svn/ver/354/tags/v1_04/perl/HTTP-Daemon-SSL/t
+END
+testmodule.t
+K 25
+svn:wc:ra_dav:version-url
+V 66
+/repos/!svn/ver/354/tags/v1_04/perl/HTTP-Daemon-SSL/t/testmodule.t
+END
+ssl_settings.req
+K 25
+svn:wc:ra_dav:version-url
+V 70
+/repos/!svn/ver/354/tags/v1_04/perl/HTTP-Daemon-SSL/t/ssl_settings.req
+END
+loadmodule.t
+K 25
+svn:wc:ra_dav:version-url
+V 66
+/repos/!svn/ver/354/tags/v1_04/perl/HTTP-Daemon-SSL/t/loadmodule.t
+END
diff --git a/t/.svn/entries b/t/.svn/entries
new file mode 100644
index 0000000..7ac014c
--- /dev/null
+++ b/t/.svn/entries
@@ -0,0 +1,67 @@
+8
+
+dir
+354
+http://cvs.pumptheory.com/repos/tags/v1_04/perl/HTTP-Daemon-SSL/t
+http://cvs.pumptheory.com/repos
+
+
+
+2007-07-24T09:29:29.000000Z
+351
+
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+e61f1579-d936-0410-a464-d4d27b584de8
+

+testmodule.t
+file
+
+
+
+
+2007-11-24T05:44:09.000000Z
+ece02320b08f6a34d84c026d9d7e39af
+2007-07-24T09:29:29.000000Z
+351
+
+has-props
+

+ssl_settings.req
+file
+
+
+
+
+2007-11-24T05:44:09.000000Z
+5a883bb6bc49c1a583b70309d8ab3e77
+2007-07-23T11:12:43.000000Z
+340
+aufflick
+has-props
+

+loadmodule.t
+file
+
+
+
+
+2007-11-24T05:44:09.000000Z
+145d03f467d2c60d0c0f7793835e68d5
+2007-07-23T11:12:43.000000Z
+340
+aufflick
+has-props
+

diff --git a/t/.svn/format b/t/.svn/format
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/t/.svn/format
@@ -0,0 +1 @@
+8
diff --git a/t/.svn/prop-base/loadmodule.t.svn-base b/t/.svn/prop-base/loadmodule.t.svn-base
new file mode 100644
index 0000000..7b57b30
--- /dev/null
+++ b/t/.svn/prop-base/loadmodule.t.svn-base
@@ -0,0 +1,9 @@
+K 13
+svn:eol-style
+V 6
+native
+K 12
+svn:keywords
+V 23
+Author Date Id Revision
+END
diff --git a/t/.svn/prop-base/ssl_settings.req.svn-base b/t/.svn/prop-base/ssl_settings.req.svn-base
new file mode 100644
index 0000000..7b57b30
--- /dev/null
+++ b/t/.svn/prop-base/ssl_settings.req.svn-base
@@ -0,0 +1,9 @@
+K 13
+svn:eol-style
+V 6
+native
+K 12
+svn:keywords
+V 23
+Author Date Id Revision
+END
diff --git a/t/.svn/prop-base/testmodule.t.svn-base b/t/.svn/prop-base/testmodule.t.svn-base
new file mode 100644
index 0000000..7b57b30
--- /dev/null
+++ b/t/.svn/prop-base/testmodule.t.svn-base
@@ -0,0 +1,9 @@
+K 13
+svn:eol-style
+V 6
+native
+K 12
+svn:keywords
+V 23
+Author Date Id Revision
+END
diff --git a/t/.svn/text-base/loadmodule.t.svn-base b/t/.svn/text-base/loadmodule.t.svn-base
new file mode 100644
index 0000000..6d56fc9
--- /dev/null
+++ b/t/.svn/text-base/loadmodule.t.svn-base
@@ -0,0 +1,21 @@
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl t/01loadmodule.t'
+
+######################### We start with some black magic to print on failure.
+
+BEGIN { $| = 1; print "1..3\n"; }
+END {print "Load failed ... not ok 1\n" unless $loaded;}
+
+use IO::Socket::SSL qw(:debug1);
+$loaded = 1;
+$test=1;
+print "ok $test\n";
+
+$test++;
+if ($IO::Socket::SSL::DEBUG == 1) { print "ok $test\n"; }
+else { print "not ok $test\n"; }
+
+$test++;
+if ($Net::SSLeay::trace == 1) { print "ok $test\n"; }
+else { print "not ok $test\n"; }
+
diff --git a/t/.svn/text-base/ssl_settings.req.svn-base b/t/.svn/text-base/ssl_settings.req.svn-base
new file mode 100644
index 0000000..ce6cf90
--- /dev/null
+++ b/t/.svn/text-base/ssl_settings.req.svn-base
@@ -0,0 +1,4 @@
+#Change the following to a port and address that you can create a listening socket on:
+$SSL_SERVER_PORT = 2000;
+$SSL_SERVER_ADDR = '127.0.0.1';
+'True Value';
\ No newline at end of file
diff --git a/t/testmodule.t b/t/.svn/text-base/testmodule.t.svn-base
similarity index 82%
copy from t/testmodule.t
copy to t/.svn/text-base/testmodule.t.svn-base
index db0b83a..d03aeef 100644
--- a/t/testmodule.t
+++ b/t/.svn/text-base/testmodule.t.svn-base
@@ -7,7 +7,7 @@ use HTTP::Status;
 eval {require "t/ssl_settings.req";} ||
 eval {require "ssl_settings.req";};
 
-$numtests = 8;
+$numtests = 9;
 $|=1;
 $SIG{PIPE}='IGNORE';
 
@@ -73,24 +73,30 @@ print "not " if (!defined fileno($server));
 print "not " unless ($server->url =~ m!^https:!);
 &ok("server url test");
 
-my $client = $server->accept;
+my $conn;
+if (!($conn = $server->accept)) {
+    # first client request is a bad request
+    &ok("bad request handled");
+} else {
+    print "not ok $test # bad request returned a socket\n";
+}
 
-if (!$client) {
-    print "not ok # no client\n";
-    exit;
+if ($conn = $server->accept) {
+    &ok("valid request handled");
+} else {
+    print "not ok $test # valid request did not return a socket\n";
 }
-&ok("server accept");
 
-my $r = $client->get_request();
+my $r = $conn->get_request();
 
 unless ($r->method eq 'GET' and $r->url->path eq '/foo') {
     print "not ";
 }
 &ok("server method processing");
 
-$client->send_error(RC_FORBIDDEN);
+$conn->send_error(RC_FORBIDDEN);
 
-close $client;
+close $conn;
 wait;
 
 sub ok {
diff --git a/t/testmodule.t b/t/testmodule.t
index db0b83a..d03aeef 100644
--- a/t/testmodule.t
+++ b/t/testmodule.t
@@ -7,7 +7,7 @@ use HTTP::Status;
 eval {require "t/ssl_settings.req";} ||
 eval {require "ssl_settings.req";};
 
-$numtests = 8;
+$numtests = 9;
 $|=1;
 $SIG{PIPE}='IGNORE';
 
@@ -73,24 +73,30 @@ print "not " if (!defined fileno($server));
 print "not " unless ($server->url =~ m!^https:!);
 &ok("server url test");
 
-my $client = $server->accept;
+my $conn;
+if (!($conn = $server->accept)) {
+    # first client request is a bad request
+    &ok("bad request handled");
+} else {
+    print "not ok $test # bad request returned a socket\n";
+}
 
-if (!$client) {
-    print "not ok # no client\n";
-    exit;
+if ($conn = $server->accept) {
+    &ok("valid request handled");
+} else {
+    print "not ok $test # valid request did not return a socket\n";
 }
-&ok("server accept");
 
-my $r = $client->get_request();
+my $r = $conn->get_request();
 
 unless ($r->method eq 'GET' and $r->url->path eq '/foo') {
     print "not ";
 }
 &ok("server method processing");
 
-$client->send_error(RC_FORBIDDEN);
+$conn->send_error(RC_FORBIDDEN);
 
-close $client;
+close $conn;
 wait;
 
 sub ok {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhttp-daemon-ssl-perl.git



More information about the Pkg-perl-cvs-commits mailing list