From 40a86723214be3595b0449201eccf749a03767f4 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 2 May 2021 18:56:32 -0700 Subject: [PATCH] gitweb: update fallback FastCGI version 1.0.0 -> 1.0.1 Signed-off-by: Kyle J. McKay --- Girocco/extra/CGI/FCGI.pm | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Girocco/extra/CGI/FCGI.pm b/Girocco/extra/CGI/FCGI.pm index 89aaf27..1293641 100644 --- a/Girocco/extra/CGI/FCGI.pm +++ b/Girocco/extra/CGI/FCGI.pm @@ -1,7 +1,7 @@ package CGI::FCGI; # CGI::FCGI -- Alternative Pure Perl CGI::Fast and FCGI implementation -# Copyright (C) 2015,2016,2017,2020 Kyle J. McKay. +# Copyright (C) 2015,2016,2017,2020,2021 Kyle J. McKay. # All rights reserved. # Licensed under the same license as Perl OR GNU GPL v2 or later @@ -12,7 +12,7 @@ package CGI::FCGI; # MUST be used BEFORE CGI::Fast and FCGI. -$CGI::FCGI::VERSION = '1.0'; +$CGI::FCGI::VERSION = '1.0.1'; use strict; use warnings; @@ -90,6 +90,7 @@ sub _init { } sub _write_all { + use bytes; my $fh = shift; my $data = shift; return unless defined $data; @@ -106,6 +107,7 @@ sub _write_all { } sub _read_all { + use bytes; my $fh = shift; my $cnt = shift; my $eofok = shift; @@ -124,6 +126,7 @@ sub _read_all { } sub _read_discard { + use bytes; my $fh = shift; my $cnt = shift; return undef unless defined $cnt && $cnt >= 0; @@ -140,6 +143,7 @@ sub _read_discard { } sub _read_one_var { + use bytes; my $data = shift; my $offset = shift || 0; my $discardvalue = shift || 0; @@ -181,6 +185,7 @@ sub _read_one_var { } sub _encode_length { + use bytes; my $l = shift; return pack('C', ($l & 0x7f)) if $l < 128; my $b3 = $l & 0xff; @@ -201,6 +206,7 @@ sub _encode_one_var { } sub _get_padding { + use bytes; my $len = shift; my $rem = $len & 0x7; return '' unless $rem; @@ -208,12 +214,17 @@ sub _get_padding { } sub _write_stream { + use bytes; my $fh = shift; my $type = shift; my $rid = shift; my $data = shift; my $force = shift; return unless ($type == 6 || $type == 7) && length($data) || $force; + while (length($data) > 65535) { + _write_all($fh, pack('CCnnCC', 1, $type, $rid, 32768, 0, 0).substr($data, 0, 32768)); + substr($data, 0, 32768) = ''; + } my $padding = _get_padding(length($data)); _write_all($fh, pack('CCnnCC', 1, $type, $rid, length($data), length($padding), 0).$data.$padding); } @@ -226,6 +237,7 @@ sub _write_end_stream { } sub _write_end_request { + use bytes; my $fh = shift; my $rid = shift; my $pstat = shift || 0; @@ -835,7 +847,13 @@ deliberately, nonpersistent. =head1 LICENSE -CGI::FCGI Copyright (C) 2015,2016,2017,2020 Kyle J. McKay. All rights reserved. +=over + +=item CGI::FCGI Copyright (C) 2015,2016,2017,2020,2021 Kyle J. McKay. + +=item All rights reserved. + +=back This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself or under the terms of the -- 2.11.4.GIT