Codebase list libhttp-message-perl / 87a8eff
Update upstream source from tag 'upstream/6.44' Update to upstream version '6.44' with Debian dir fe05b5c7b1a2a9e090cf82433ec2358b4dfd7702 gregor herrmann 1 year, 6 months ago
25 changed file(s) with 96 addition(s) and 128 deletion(s). Raw diff Collapse all Expand all
3838 * Hans-H. Froehlich
3939 * Ian Kilgore
4040 * Jacob J
41 * Jakub Skory
4142 * Jakub Wilk
4243 * James Raspass
4344 * jefflee
00 Revision history for HTTP-Message
1
2 6.44 2022-10-26 20:49:00Z
3 - Made the Clone module a hard requirement, so we don't have to
4 provide a fallback function for HTTP::Headers::clone().
5 We require at least Clone 0.46, as that release now supports
6 Perl back to 5.8.1, just like us. (GH#184) (Neil Bowers)
7 - Import clone from Clone rather than inheriting (GH#189) (Graham Knop)
8 - Made the Compress::Raw::Zlib 2.062 module minimal required
9 version. (GH#190) (Jakub 'q84fh' Skory)
10
11 6.43 2022-10-22 14:50:35Z
12 - Remove dependency to IO::Uncompress::Bunzip2. (Michal Josef Spacek)
13 - Remove dependency to IO::Uncompress::Gunzip. (Michal Josef Spacek)
14
15 6.42 2022-10-18 13:53:22Z
16 - We now don't consider the Content-Location header when asked
17 for the base URI. RFC 7231 says we shouldn't. (GH#51) (Neil Bowers)
18 - Increased the (max) buffer size for read() when processing form data,
19 from 2048 to 8192. This was suggested in RT#105184, as it improved
20 performance for them. (GH#59) (Neil Bowers)
121
222 6.41 2022-10-12 15:57:40Z
323 - Add maximum size for HTTP::Message->decoded_content
3131 },
3232 "develop" : {
3333 "requires" : {
34 "Clone" : "0",
3534 "File::Spec" : "0",
3635 "IO::Handle" : "0",
3736 "IPC::Open3" : "0",
5150 },
5251 "requires" : {
5352 "Carp" : "0",
53 "Clone" : "0.46",
5454 "Compress::Raw::Bzip2" : "0",
55 "Compress::Raw::Zlib" : "0",
55 "Compress::Raw::Zlib" : "2.062",
5656 "Encode" : "3.01",
5757 "Encode::Locale" : "1",
5858 "Exporter" : "5.57",
6262 "IO::Compress::Deflate" : "0",
6363 "IO::Compress::Gzip" : "0",
6464 "IO::HTML" : "0",
65 "IO::Uncompress::Bunzip2" : "2.021",
66 "IO::Uncompress::Gunzip" : "0",
6765 "IO::Uncompress::Inflate" : "0",
6866 "IO::Uncompress::RawInflate" : "0",
6967 "LWP::MediaTypes" : "6",
7472 "perl" : "5.008001",
7573 "strict" : "0",
7674 "warnings" : "0"
77 },
78 "suggests" : {
79 "Clone" : "0"
8075 }
8176 },
8277 "test" : {
115110 "x_IRC" : "irc://irc.perl.org/#lwp",
116111 "x_MailingList" : "mailto:libwww@perl.org"
117112 },
118 "version" : "6.41",
113 "version" : "6.44",
119114 "x_Dist_Zilla" : {
120115 "perl" : {
121116 "version" : "5.036000"
480475 "changelog" : "Changes"
481476 },
482477 "Dist::Zilla::Role::Git::Repo" : {
483 "git_version" : "2.38.0",
478 "git_version" : "2.38.1",
484479 "repo_root" : "."
485480 }
486481 },
491486 "class" : "Dist::Zilla::Plugin::Git::Contributors",
492487 "config" : {
493488 "Dist::Zilla::Plugin::Git::Contributors" : {
494 "git_version" : "2.38.0",
489 "git_version" : "2.38.1",
495490 "include_authors" : 0,
496491 "include_releaser" : 1,
497492 "order_by" : "name",
600595 "changelog" : "Changes"
601596 },
602597 "Dist::Zilla::Role::Git::Repo" : {
603 "git_version" : "2.38.0",
598 "git_version" : "2.38.1",
604599 "repo_root" : "."
605600 },
606601 "Dist::Zilla::Role::Git::StringFormatter" : {
617612 "branch" : null,
618613 "changelog" : "Changes",
619614 "signed" : 0,
620 "tag" : "v6.41",
615 "tag" : "v6.44",
621616 "tag_format" : "v%V",
622617 "tag_message" : "v%V"
623618 },
624619 "Dist::Zilla::Role::Git::Repo" : {
625 "git_version" : "2.38.0",
620 "git_version" : "2.38.1",
626621 "repo_root" : "."
627622 },
628623 "Dist::Zilla::Role::Git::StringFormatter" : {
673668 "changelog" : "Changes"
674669 },
675670 "Dist::Zilla::Role::Git::Repo" : {
676 "git_version" : "2.38.0",
671 "git_version" : "2.38.1",
677672 "repo_root" : "."
678673 },
679674 "Dist::Zilla::Role::Git::StringFormatter" : {
693688 "remotes_must_exist" : 1
694689 },
695690 "Dist::Zilla::Role::Git::Repo" : {
696 "git_version" : "2.38.0",
691 "git_version" : "2.38.1",
697692 "repo_root" : "."
698693 }
699694 },
700695 "name" : "@Author::OALDERS/Git::Push",
701696 "version" : "2.048"
702 },
703 {
704 "class" : "Dist::Zilla::Plugin::Prereqs::Soften",
705 "config" : {
706 "Dist::Zilla::Plugin::Prereqs::Soften" : {
707 "copy_to" : [
708 "develop.requires"
709 ],
710 "modules" : [
711 "Clone"
712 ],
713 "modules_from_features" : null,
714 "to_relationship" : "suggests"
715 }
716 },
717 "name" : "Prereqs::Soften",
718 "version" : "0.006003"
719697 },
720698 {
721699 "class" : "Dist::Zilla::Plugin::Prereqs::Soften",
861839 "Hans-H. Froehlich <hfroehlich@co-de-co.de>",
862840 "Ian Kilgore <iank@cpan.org>",
863841 "Jacob J <waif@chaos2.org>",
842 "Jakub Skory <jakub.skory@atos.net>",
864843 "Jakub Wilk <jwilk@jwilk.net>",
865844 "James Raspass <jraspass@gmail.com>",
866845 "jefflee <shaohua@gmail.com>",
3434 IO::Uncompress::Brotli: '0.004001'
3535 requires:
3636 Carp: '0'
37 Clone: '0.46'
3738 Compress::Raw::Bzip2: '0'
38 Compress::Raw::Zlib: '0'
39 Compress::Raw::Zlib: '2.062'
3940 Encode: '3.01'
4041 Encode::Locale: '1'
4142 Exporter: '5.57'
4546 IO::Compress::Deflate: '0'
4647 IO::Compress::Gzip: '0'
4748 IO::HTML: '0'
48 IO::Uncompress::Bunzip2: '2.021'
49 IO::Uncompress::Gunzip: '0'
5049 IO::Uncompress::Inflate: '0'
5150 IO::Uncompress::RawInflate: '0'
5251 LWP::MediaTypes: '6'
6362 bugtracker: https://github.com/libwww-perl/HTTP-Message/issues
6463 homepage: https://github.com/libwww-perl/HTTP-Message
6564 repository: https://github.com/libwww-perl/HTTP-Message.git
66 version: '6.41'
65 version: '6.44'
6766 x_Dist_Zilla:
6867 perl:
6968 version: '5.036000'
347346 allow_dirty_match: []
348347 changelog: Changes
349348 Dist::Zilla::Role::Git::Repo:
350 git_version: 2.38.0
349 git_version: 2.38.1
351350 repo_root: .
352351 name: '@Author::OALDERS/Git::Check'
353352 version: '2.048'
355354 class: Dist::Zilla::Plugin::Git::Contributors
356355 config:
357356 Dist::Zilla::Plugin::Git::Contributors:
358 git_version: 2.38.0
357 git_version: 2.38.1
359358 include_authors: 0
360359 include_releaser: 1
361360 order_by: name
439438 allow_dirty_match: []
440439 changelog: Changes
441440 Dist::Zilla::Role::Git::Repo:
442 git_version: 2.38.0
441 git_version: 2.38.1
443442 repo_root: .
444443 Dist::Zilla::Role::Git::StringFormatter:
445444 time_zone: local
452451 branch: ~
453452 changelog: Changes
454453 signed: 0
455 tag: v6.41
454 tag: v6.44
456455 tag_format: v%V
457456 tag_message: v%V
458457 Dist::Zilla::Role::Git::Repo:
459 git_version: 2.38.0
458 git_version: 2.38.1
460459 repo_root: .
461460 Dist::Zilla::Role::Git::StringFormatter:
462461 time_zone: local
494493 - (?^:^lib/.*\.pm$)
495494 changelog: Changes
496495 Dist::Zilla::Role::Git::Repo:
497 git_version: 2.38.0
496 git_version: 2.38.1
498497 repo_root: .
499498 Dist::Zilla::Role::Git::StringFormatter:
500499 time_zone: local
508507 - origin
509508 remotes_must_exist: 1
510509 Dist::Zilla::Role::Git::Repo:
511 git_version: 2.38.0
510 git_version: 2.38.1
512511 repo_root: .
513512 name: '@Author::OALDERS/Git::Push'
514513 version: '2.048'
515 -
516 class: Dist::Zilla::Plugin::Prereqs::Soften
517 config:
518 Dist::Zilla::Plugin::Prereqs::Soften:
519 copy_to:
520 - develop.requires
521 modules:
522 - Clone
523 modules_from_features: ~
524 to_relationship: suggests
525 name: Prereqs::Soften
526 version: '0.006003'
527514 -
528515 class: Dist::Zilla::Plugin::Prereqs::Soften
529516 config:
642629 - 'Hans-H. Froehlich <hfroehlich@co-de-co.de>'
643630 - 'Ian Kilgore <iank@cpan.org>'
644631 - 'Jacob J <waif@chaos2.org>'
632 - 'Jakub Skory <jakub.skory@atos.net>'
645633 - 'Jakub Wilk <jwilk@jwilk.net>'
646634 - 'James Raspass <jraspass@gmail.com>'
647635 - 'jefflee <shaohua@gmail.com>'
1717 "NAME" => "HTTP::Message",
1818 "PREREQ_PM" => {
1919 "Carp" => 0,
20 "Clone" => "0.46",
2021 "Compress::Raw::Bzip2" => 0,
21 "Compress::Raw::Zlib" => 0,
22 "Compress::Raw::Zlib" => "2.062",
2223 "Encode" => "3.01",
2324 "Encode::Locale" => 1,
2425 "Exporter" => "5.57",
2829 "IO::Compress::Deflate" => 0,
2930 "IO::Compress::Gzip" => 0,
3031 "IO::HTML" => 0,
31 "IO::Uncompress::Bunzip2" => "2.021",
32 "IO::Uncompress::Gunzip" => 0,
3332 "IO::Uncompress::Inflate" => 0,
3433 "IO::Uncompress::RawInflate" => 0,
3534 "LWP::MediaTypes" => 6,
5352 "lib" => 0,
5453 "overload" => 0
5554 },
56 "VERSION" => "6.41",
55 "VERSION" => "6.44",
5756 "test" => {
5857 "TESTS" => "t/*.t"
5958 }
6261
6362 my %FallbackPrereqs = (
6463 "Carp" => 0,
64 "Clone" => "0.46",
6565 "Compress::Raw::Bzip2" => 0,
66 "Compress::Raw::Zlib" => 0,
66 "Compress::Raw::Zlib" => "2.062",
6767 "Encode" => "3.01",
6868 "Encode::Locale" => 1,
6969 "Exporter" => "5.57",
7575 "IO::Compress::Deflate" => 0,
7676 "IO::Compress::Gzip" => 0,
7777 "IO::HTML" => 0,
78 "IO::Uncompress::Bunzip2" => "2.021",
79 "IO::Uncompress::Gunzip" => 0,
8078 "IO::Uncompress::Inflate" => 0,
8179 "IO::Uncompress::RawInflate" => 0,
8280 "LWP::MediaTypes" => 6,
33
44 # VERSION
55
6 version 6.41
6 version 6.44
77
88 # SYNOPSIS
99
11 # Do not edit this file directly. To change prereqs, edit the `dist.ini` file.
22
33 requires "Carp" => "0";
4 requires "Clone" => "0.46";
45 requires "Compress::Raw::Bzip2" => "0";
5 requires "Compress::Raw::Zlib" => "0";
6 requires "Compress::Raw::Zlib" => "2.062";
67 requires "Encode" => "3.01";
78 requires "Encode::Locale" => "1";
89 requires "Exporter" => "5.57";
1213 requires "IO::Compress::Deflate" => "0";
1314 requires "IO::Compress::Gzip" => "0";
1415 requires "IO::HTML" => "0";
15 requires "IO::Uncompress::Bunzip2" => "2.021";
16 requires "IO::Uncompress::Gunzip" => "0";
1716 requires "IO::Uncompress::Inflate" => "0";
1817 requires "IO::Uncompress::RawInflate" => "0";
1918 requires "LWP::MediaTypes" => "6";
2625 requires "warnings" => "0";
2726 recommends "IO::Compress::Brotli" => "0.004001";
2827 recommends "IO::Uncompress::Brotli" => "0.004001";
29 suggests "Clone" => "0";
3028
3129 on 'test' => sub {
3230 requires "ExtUtils::MakeMaker" => "0";
5957 };
6058
6159 on 'develop' => sub {
62 requires "Clone" => "0";
6360 requires "File::Spec" => "0";
6461 requires "IO::Handle" => "0";
6562 requires "IPC::Open3" => "0";
99 x_MailingList = mailto:libwww@perl.org
1010
1111 [Prereqs]
12 Compress::Raw::Zlib = 0
12 Compress::Raw::Zlib = 2.062
1313 Encode = 3.01
1414 Encode::Locale = 1
1515 Exporter = 5.57
1717 IO::Compress::Brotli = 0.004001
1818 IO::Compress::Bzip2 = 2.021
1919 IO::Uncompress::Brotli = 0.004001
20 IO::Uncompress::Bunzip2 = 2.021
2120 LWP::MediaTypes = 6
2221 MIME::Base64 = 2.1
2322 perl = 5.008001
2423 URI = 1.10
24 Clone = 0.46
2525
2626 [@Author::OALDERS]
2727 ; all these tests are TODO
3434 -remove = Test::TidyAll
3535 StaticInstall.mode = on
3636 StaticInstall.dry_run = 0
37
38 [Prereqs::Soften]
39 to_relationship = suggests
40 copy_to = develop.requires
41 module = Clone
4237
4338 [Prereqs::Soften / Brotli]
4439 to_relationship = recommends
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 use URI;
88
248248
249249 =head1 VERSION
250250
251 version 6.41
251 version 6.44
252252
253253 =head1 SYNOPSIS
254254
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 use HTTP::Headers;
88
110110
111111 =head1 VERSION
112112
113 version 6.41
113 version 6.44
114114
115115 =head1 AUTHOR
116116
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 require HTTP::Date;
88
106106
107107 =head1 VERSION
108108
109 version 6.41
109 version 6.44
110110
111111 =head1 AUTHOR
112112
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 use Exporter 5.57 'import';
88
102102
103103 =head1 VERSION
104104
105 version 6.41
105 version 6.44
106106
107107 =head1 SYNOPSIS
108108
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
6
5 our $VERSION = '6.44';
6
7 use Clone qw(clone);
78 use Carp ();
89
910 # The $TRANSLATE_UNDERSCORE variable controls whether '_' can be used
297298 }
298299
299300
300
301 if (eval { require Clone; 1 }) {
302 *clone = \&Clone::clone;
303 } else {
304 *clone = sub {
305 my $self = shift;
306 my $clone = HTTP::Headers->new;
307 $self->scan(sub { $clone->push_header(@_);} );
308 $clone;
309 };
310 }
311
312
313301 sub _date_header
314302 {
315303 require HTTP::Date;
474462
475463 =head1 VERSION
476464
477 version 6.41
465 version 6.44
478466
479467 =head1 SYNOPSIS
480468
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 require HTTP::Headers;
88 require Carp;
492492 # XXX preferably we should determine if the modules are available without loading
493493 # them here
494494 eval {
495 require IO::Uncompress::Gunzip;
495 require Compress::Raw::Zlib;
496496 push(@enc, "gzip", "x-gzip");
497497 };
498498 eval {
501501 push(@enc, "deflate");
502502 };
503503 eval {
504 require IO::Uncompress::Bunzip2;
504 require Compress::Raw::Bzip2;
505505 push(@enc, "x-bzip2", "bzip2");
506506 };
507507 eval {
883883
884884 =head1 VERSION
885885
886 version 6.41
886 version 6.44
887887
888888 =head1 SYNOPSIS
889889
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 our $DYNAMIC_FILE_UPLOAD ||= 0; # make it defined (don't know why)
8 our $READ_BUFFER_SIZE = 8192;
89
910 use Exporter 5.57 'import';
1011
252253 binmode($fh);
253254 }
254255 my $buflength = length $buf;
255 my $n = read($fh, $buf, 2048, $buflength);
256 my $n = read($fh, $buf, $READ_BUFFER_SIZE, $buflength);
256257 if ($n) {
257258 $buflength += $n;
258259 unshift(@parts, ["", $fh]);
313314
314315 =head1 VERSION
315316
316 version 6.41
317 version 6.44
317318
318319 =head1 SYNOPSIS
319320
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 use parent 'HTTP::Message';
88
154154
155155 =head1 VERSION
156156
157 version 6.41
157 version 6.44
158158
159159 =head1 SYNOPSIS
160160
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 use parent 'HTTP::Message';
88
8383 my $self = shift;
8484 my $base = (
8585 $self->header('Content-Base'), # used to be HTTP/1.1
86 $self->header('Content-Location'), # HTTP/1.1
8786 $self->header('Base'), # HTTP/1.0
8887 )[0];
8988 if ($base && $base =~ /^$URI::scheme_re:/o) {
350349
351350 =head1 VERSION
352351
353 version 6.41
352 version 6.44
354353
355354 =head1 SYNOPSIS
356355
481480
482481 =item 2.
483482
484 A "Content-Base:" or a "Content-Location:" header in the response.
483 A "Content-Base:" header in the response.
485484
486485 For backwards compatibility with older HTTP implementations we will
487486 also look for the "Base:" header.
495494 =back
496495
497496 If none of these sources provide an absolute URI, undef is returned.
497
498 B<Note>: previous versions of HTTP::Response would also consider
499 a "Content-Location:" header,
500 as L<RFC 2616|https://www.rfc-editor.org/rfc/rfc2616> said it should be.
501 But this was never widely implemented by browsers,
502 and now L<RFC 7231|https://www.rfc-editor.org/rfc/rfc7231>
503 says it should no longer be considered.
498504
499505 When the LWP protocol modules produce the HTTP::Response object, then any base
500506 URI embedded in the document (step 1) will already have initialized the
22 use strict;
33 use warnings;
44
5 our $VERSION = '6.41';
5 our $VERSION = '6.44';
66
77 use Exporter 5.57 'import';
88
180180
181181 =head1 VERSION
182182
183 version 6.41
183 version 6.44
184184
185185 =head1 SYNOPSIS
186186
99 },
1010 'develop' => {
1111 'requires' => {
12 'Clone' => '0',
1312 'File::Spec' => '0',
1413 'IO::Handle' => '0',
1514 'IPC::Open3' => '0',
2928 },
3029 'requires' => {
3130 'Carp' => '0',
31 'Clone' => '0.46',
3232 'Compress::Raw::Bzip2' => '0',
33 'Compress::Raw::Zlib' => '0',
33 'Compress::Raw::Zlib' => '2.062',
3434 'Encode' => '3.01',
3535 'Encode::Locale' => '1',
3636 'Exporter' => '5.57',
4040 'IO::Compress::Deflate' => '0',
4141 'IO::Compress::Gzip' => '0',
4242 'IO::HTML' => '0',
43 'IO::Uncompress::Bunzip2' => '2.021',
44 'IO::Uncompress::Gunzip' => '0',
4543 'IO::Uncompress::Inflate' => '0',
4644 'IO::Uncompress::RawInflate' => '0',
4745 'LWP::MediaTypes' => '6',
5250 'perl' => '5.008001',
5351 'strict' => '0',
5452 'warnings' => '0'
55 },
56 'suggests' => {
57 'Clone' => '0'
5853 }
5954 },
6055 'test' => {
230230 #note int(@chunks), " chunks, total size is ", length($_), " bytes\n";
231231
232232 # should be close to expected size and number of chunks
233 cmp_ok(abs(@chunks - 15), '<', 3);
233 cmp_ok(abs(@chunks - 6), '<', 3);
234234 cmp_ok(abs(length($_) - 26589), '<', 20);
235235
236236 $r = POST 'http://www.example.com';
77 use HTTP::Headers qw( );
88 use HTTP::Response qw( );
99
10 use Test::Needs { 'Compress::Raw::Zlib' => '2.061' };
10 use Test::Needs { 'Compress::Raw::Zlib' => '2.062' };
1111 plan tests => 9;
1212
1313 # Create a nasty gzip stream:
499499 ok(!$m->header("Client-Warning"));
500500
501501
502 if (eval "require IO::Uncompress::Bunzip2") {
502 if (eval "require Compress::Raw::Bzip2") {
503503 for my $encoding (qw/x-bzip2 bzip2/) {
504504 $m = HTTP::Message->new([
505505 "Content-Type" => "text/plain",
530530 }
531531 }
532532 else {
533 skip("Need IO::Uncompress::Bunzip2", undef) for 1..18;
533 skip("Need Compress::Raw::Bzip2", undef) for 1..18;
534534 }
535535
536536 # test decoding of XML content
1515 is( $req->method, "GET" );
1616 is( $req->uri, "http://www.example.com" );
1717 like( $req->header("Accept-Encoding"), qr/\bgzip\b/ )
18 ; # assuming IO::Uncompress::Gunzip is there
18 ; # assuming Compress::Raw::Zlib is there
1919
2020 $req->dump( prefix => "# " );
2121
104104
105105 is($r->base, $r->request->uri);
106106 $r->push_header("Content-Location", "/1/A/a");
107 is($r->base, "http://www.sn.no/1/A/a");
107 is($r->base, $r->request->uri); # we no longer consider Content-Location
108108 $r->push_header("Content-Base", "/2/;a=/foo/bar");
109109 is($r->base, "http://www.sn.no/2/;a=/foo/bar");
110110 $r->push_header("Content-Base", "/3/");
77
88 note 'Checking Changes';
99 my $changes_file = 'Changes';
10 my $newver = '6.41';
10 my $newver = '6.44';
1111 my $trial_token = '-TRIAL';
1212 my $encoding = 'UTF-8';
1313