Hello community,

here is the log from the commit of package perl-Protocol-WebSocket for 
openSUSE:Factory checked in at 2019-03-20 13:18:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Protocol-WebSocket (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Protocol-WebSocket.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Protocol-WebSocket"

Wed Mar 20 13:18:30 2019 rev:2 rq:684907 version:0.26

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Protocol-WebSocket/perl-Protocol-WebSocket.changes
  2018-02-15 13:25:41.395575746 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Protocol-WebSocket.new.28833/perl-Protocol-WebSocket.changes
       2019-03-20 13:18:30.977354835 +0100
@@ -1,0 +2,15 @@
+Wed Mar 13 16:32:45 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 0.26
+   see /usr/share/doc/packages/perl-Protocol-WebSocket/Changes
+
+  0.26 2019-03-09T09:35:15Z
+  
+   - Introduce MAX_FRAGMENTS_AMOUNT to change the allowable amount of 
fragments (Daniel Kamil Kozar)
+   - Update draft-ietf-hybi-00 tests to include the error text in response 
line (Daniel Kamil Kozar)
+  
+  0.25 2019-03-09T09:31:45Z
+  
+   - The "Wrong response line" error now includes the actual response line 
(Max Maischein)
+
+-------------------------------------------------------------------

Old:
----
  Protocol-WebSocket-0.24.tar.gz

New:
----
  Protocol-WebSocket-0.26.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Protocol-WebSocket.spec ++++++
--- /var/tmp/diff_new_pack.INcj7Q/_old  2019-03-20 13:18:31.781354657 +0100
+++ /var/tmp/diff_new_pack.INcj7Q/_new  2019-03-20 13:18:31.785354656 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Protocol-WebSocket
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,18 +12,18 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           perl-Protocol-WebSocket
-Version:        0.24
+Version:        0.26
 Release:        0
 %define cpan_name Protocol-WebSocket
 Summary:        WebSocket protocol
-License:        Artistic-1.0 or GPL-1.0+
+License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
-Url:            http://search.cpan.org/dist/Protocol-WebSocket/
+Url:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/V/VT/VTI/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
@@ -59,7 +59,7 @@
 find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
 
 %build
-%{__perl} Build.PL --installdirs=vendor
+perl Build.PL --installdirs=vendor
 ./Build build --flags=%{?_smp_mflags}
 
 %check

++++++ Protocol-WebSocket-0.24.tar.gz -> Protocol-WebSocket-0.26.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Protocol-WebSocket-0.24/Changes 
new/Protocol-WebSocket-0.26/Changes
--- old/Protocol-WebSocket-0.24/Changes 2018-01-13 10:59:09.000000000 +0100
+++ new/Protocol-WebSocket-0.26/Changes 2019-03-09 10:35:18.000000000 +0100
@@ -1,5 +1,14 @@
 Revision history for perl module Protocol::WebSocket
 
+0.26 2019-03-09T09:35:15Z
+
+ - Introduce MAX_FRAGMENTS_AMOUNT to change the allowable amount of fragments 
(Daniel Kamil Kozar)
+ - Update draft-ietf-hybi-00 tests to include the error text in response line 
(Daniel Kamil Kozar)
+
+0.25 2019-03-09T09:31:45Z
+
+ - The "Wrong response line" error now includes the actual response line (Max 
Maischein)
+
 0.24 2018-01-13T09:59:07Z
 
  -  draft-ietf-hybi-17 uses origin header, not sec-websocket-origin (Eric 
Wastl)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Protocol-WebSocket-0.24/META.json 
new/Protocol-WebSocket-0.26/META.json
--- old/Protocol-WebSocket-0.24/META.json       2018-01-13 10:59:09.000000000 
+0100
+++ new/Protocol-WebSocket-0.26/META.json       2019-03-09 10:35:18.000000000 
+0100
@@ -4,7 +4,7 @@
       "Viacheslav Tykhanovskyi, C<[email protected]>."
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Minilla/v3.0.13",
+   "generated_by" : "Minilla/v3.1.3",
    "license" : [
       "perl_5"
    ],
@@ -52,7 +52,7 @@
    "provides" : {
       "Protocol::WebSocket" : {
          "file" : "lib/Protocol/WebSocket.pm",
-         "version" : "0.24"
+         "version" : "0.26"
       },
       "Protocol::WebSocket::Client" : {
          "file" : "lib/Protocol/WebSocket/Client.pm"
@@ -105,17 +105,19 @@
          "web" : "https://github.com/vti/protocol-websocket";
       }
    },
-   "version" : "0.24",
+   "version" : "0.26",
    "x_contributors" : [
       "Anton Petrusevich <[email protected]>",
       "BlueT - Matthew Lien - 練喆明 <[email protected]>",
       "Chia-liang Kao <[email protected]>",
+      "Daniel Kamil Kozar <[email protected]>",
       "Eric Wastl <[email protected]>",
       "Graham Ollis <[email protected]>",
       "Joao Orui <[email protected]>",
       "Jon Gentle <[email protected]>",
       "Jonathan Barber <[email protected]>",
       "Lee Aylward <[email protected]>",
+      "Max Maischein <[email protected]>",
       "Michal Špaček <[email protected]>",
       "Neil Bowers <[email protected]>",
       "Paul \"LeoNerd\" Evans <[email protected]>",
@@ -123,5 +125,6 @@
       "vti <[email protected]>",
       "vti <[email protected]>"
    ],
-   "x_serialization_backend" : "JSON::PP version 2.27400_02"
+   "x_serialization_backend" : "JSON::PP version 2.97001",
+   "x_static_install" : 1
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Protocol-WebSocket-0.24/META.yml 
new/Protocol-WebSocket-0.26/META.yml
--- old/Protocol-WebSocket-0.24/META.yml        2018-01-13 10:59:09.000000000 
+0100
+++ new/Protocol-WebSocket-0.26/META.yml        2019-03-09 10:35:18.000000000 
+0100
@@ -6,7 +6,7 @@
 configure_requires:
   Module::Build::Tiny: '0.035'
 dynamic_config: 0
-generated_by: 'Minilla/v3.0.13, CPAN::Meta::Converter version 2.150010'
+generated_by: 'Minilla/v3.1.3, CPAN::Meta::Converter version 2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,7 +25,7 @@
 provides:
   Protocol::WebSocket:
     file: lib/Protocol/WebSocket.pm
-    version: '0.24'
+    version: '0.26'
   Protocol::WebSocket::Client:
     file: lib/Protocol/WebSocket/Client.pm
   Protocol::WebSocket::Cookie:
@@ -61,17 +61,19 @@
   bugtracker: https://github.com/vti/protocol-websocket/issues
   homepage: https://github.com/vti/protocol-websocket
   repository: git://github.com/vti/protocol-websocket.git
-version: '0.24'
+version: '0.26'
 x_contributors:
   - 'Anton Petrusevich <[email protected]>'
   - 'BlueT - Matthew Lien - 練喆明 <[email protected]>'
   - 'Chia-liang Kao <[email protected]>'
+  - 'Daniel Kamil Kozar <[email protected]>'
   - 'Eric Wastl <[email protected]>'
   - 'Graham Ollis <[email protected]>'
   - 'Joao Orui <[email protected]>'
   - 'Jon Gentle <[email protected]>'
   - 'Jonathan Barber <[email protected]>'
   - 'Lee Aylward <[email protected]>'
+  - 'Max Maischein <[email protected]>'
   - 'Michal Špaček <[email protected]>'
   - 'Neil Bowers <[email protected]>'
   - 'Paul "LeoNerd" Evans <[email protected]>'
@@ -79,3 +81,4 @@
   - 'vti <[email protected]>'
   - 'vti <[email protected]>'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
+x_static_install: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Protocol-WebSocket-0.24/lib/Protocol/WebSocket/Frame.pm 
new/Protocol-WebSocket-0.26/lib/Protocol/WebSocket/Frame.pm
--- old/Protocol-WebSocket-0.24/lib/Protocol/WebSocket/Frame.pm 2018-01-13 
10:59:09.000000000 +0100
+++ new/Protocol-WebSocket-0.26/lib/Protocol/WebSocket/Frame.pm 2019-03-09 
10:35:18.000000000 +0100
@@ -11,6 +11,7 @@
 use constant MATH_RANDOM_SECURE => eval "require Math::Random::Secure;";
 
 our $MAX_PAYLOAD_SIZE = 65536;
+our $MAX_FRAGMENTS_AMOUNT = 128;
 
 our %TYPES = (
     continuation => 0x00,
@@ -54,7 +55,7 @@
 
     $self->{fragments} = [];
 
-    $self->{max_fragments_amount} ||= 128;
+    $self->{max_fragments_amount} ||= $MAX_FRAGMENTS_AMOUNT unless exists 
$self->{max_fragments_amount};
     $self->{max_payload_size}     ||= $MAX_PAYLOAD_SIZE unless exists 
$self->{max_payload_size};
 
     return $self;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Protocol-WebSocket-0.24/lib/Protocol/WebSocket/Response.pm 
new/Protocol-WebSocket-0.26/lib/Protocol/WebSocket/Response.pm
--- old/Protocol-WebSocket-0.24/lib/Protocol/WebSocket/Response.pm      
2018-01-13 10:59:09.000000000 +0100
+++ new/Protocol-WebSocket-0.26/lib/Protocol/WebSocket/Response.pm      
2019-03-09 10:35:18.000000000 +0100
@@ -147,7 +147,11 @@
 
     my $status = $self->status;
     unless ($line =~ m{^HTTP/1\.1 $status }) {
-        $self->error('Wrong response line');
+        my $vis = $line;
+        if( length( $vis ) > 80 ) {
+            substr( $vis, 77 )= '...';
+        }
+        $self->error('Wrong response line. Got [[' . $vis . "]], expected 
[[HTTP/1.1 $status ]]");
         return;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Protocol-WebSocket-0.24/lib/Protocol/WebSocket.pm 
new/Protocol-WebSocket-0.26/lib/Protocol/WebSocket.pm
--- old/Protocol-WebSocket-0.24/lib/Protocol/WebSocket.pm       2018-01-13 
10:59:09.000000000 +0100
+++ new/Protocol-WebSocket-0.26/lib/Protocol/WebSocket.pm       2019-03-09 
10:35:18.000000000 +0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.24';
+our $VERSION = '0.26';
 
 use Protocol::WebSocket::Frame;
 use Protocol::WebSocket::Handshake::Client;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Protocol-WebSocket-0.24/t/draft-ietf-hybi-00/client-ssl.t 
new/Protocol-WebSocket-0.26/t/draft-ietf-hybi-00/client-ssl.t
--- old/Protocol-WebSocket-0.24/t/draft-ietf-hybi-00/client-ssl.t       
2018-01-13 10:59:09.000000000 +0100
+++ new/Protocol-WebSocket-0.26/t/draft-ietf-hybi-00/client-ssl.t       
2019-03-09 10:35:18.000000000 +0100
@@ -71,4 +71,5 @@
 
 $h = Protocol::WebSocket::Handshake::Client->new;
 ok !$h->parse("HTTP/1.0 foo bar\x0d\x0a");
-is $h->error => 'Wrong response line';
+is $h->error => 'Wrong response line. Got [[HTTP/1.0 foo bar]], '
+  . 'expected [[HTTP/1.1 101 ]]';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Protocol-WebSocket-0.24/t/draft-ietf-hybi-00/client.t 
new/Protocol-WebSocket-0.26/t/draft-ietf-hybi-00/client.t
--- old/Protocol-WebSocket-0.24/t/draft-ietf-hybi-00/client.t   2018-01-13 
10:59:09.000000000 +0100
+++ new/Protocol-WebSocket-0.26/t/draft-ietf-hybi-00/client.t   2019-03-09 
10:35:18.000000000 +0100
@@ -71,4 +71,5 @@
 
 $h = Protocol::WebSocket::Handshake::Client->new;
 ok !$h->parse("HTTP/1.0 foo bar\x0d\x0a");
-is $h->error => 'Wrong response line';
+is $h->error => 'Wrong response line. Got [[HTTP/1.0 foo bar]], '
+  . 'expected [[HTTP/1.1 101 ]]';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Protocol-WebSocket-0.24/t/frame.t 
new/Protocol-WebSocket-0.26/t/frame.t
--- old/Protocol-WebSocket-0.24/t/frame.t       2018-01-13 10:59:09.000000000 
+0100
+++ new/Protocol-WebSocket-0.26/t/frame.t       2019-03-09 10:35:18.000000000 
+0100
@@ -78,4 +78,19 @@
     is $@, '';
 };
 
+my $first_fragment = Protocol::WebSocket::Frame->new(buffer => 'x', type => 
'text', fin => 0);
+my $a_fragment = Protocol::WebSocket::Frame->new(buffer => 'x', type => 
'continuation', fin => 0);
+
+subtest 'maximum number or fragments exceeded' => sub {
+    local $Protocol::WebSocket::Frame::MAX_FRAGMENTS_AMOUNT = 42;
+    my $frame = Protocol::WebSocket::Frame->new();
+    is $frame->{max_fragments_amount}, 42;
+
+    $frame->append($first_fragment->to_bytes);
+    $frame->append($a_fragment->to_bytes) for ( 1 .. 
$frame->{max_fragments_amount} );
+
+    eval { $frame->next_bytes };
+    like $@, qr/Too many fragments/;
+};
+
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Protocol-WebSocket-0.24/t/response_common.t 
new/Protocol-WebSocket-0.26/t/response_common.t
--- old/Protocol-WebSocket-0.24/t/response_common.t     2018-01-13 
10:59:09.000000000 +0100
+++ new/Protocol-WebSocket-0.26/t/response_common.t     2019-03-09 
10:35:18.000000000 +0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 6;
+use Test::More tests => 8;
 
 use_ok 'Protocol::WebSocket::Response';
 
@@ -12,7 +12,12 @@
 $res = Protocol::WebSocket::Response->new;
 $res->parse("foo\x0d\x0a");
 ok $res->is_state('error');
-is $res->error => 'Wrong response line';
+is $res->error => 'Wrong response line. Got [[foo]], expected [[HTTP/1.1 101 
]]';
+
+$res = Protocol::WebSocket::Response->new;
+$res->parse(("1234567890" x 10) . "\x0d\x0a");
+ok $res->is_state('error');
+is $res->error => 'Wrong response line. Got 
[[12345678901234567890123456789012345678901234567890123456789012345678901234567...]],
 expected [[HTTP/1.1 101 ]]';
 
 local $Protocol::WebSocket::Message::MAX_MESSAGE_SIZE = 1024;
 


Reply via email to