Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Update HTTP::Tiny to CPAN version 0.012 #11223

Closed
p5pRT opened this issue Mar 31, 2011 · 7 comments
Closed

[PATCH] Update HTTP::Tiny to CPAN version 0.012 #11223

p5pRT opened this issue Mar 31, 2011 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 31, 2011

Migrated from rt.perl.org#87438 (status was 'resolved')

Searchable as RT87438$

@p5pRT
Copy link
Author

p5pRT commented Mar 31, 2011

From @xdg

This is a bug report for perl from dagolden@​cpan.org,
generated with the help of perlbug 1.39 running under perl 5.12.3.

From 82baa73fd3d59e6a277f0c8e15c82abaef824353 Mon Sep 17 00​:00​:00 2001
From​: David Golden <dagolden@​cpan.org>
Date​: Thu, 31 Mar 2011 15​:59​:44 -0400
Subject​: [PATCH] Update HTTP​::Tiny to CPAN version 0.012

HTTP​::Tiny 0.011 fails to mirror files correctly on MSWin32, preventing
CPAN bootstrapping over HTTP with just core Perl. This is fixed in CPAN
version 0.012.

[DELTA]

0.012 2011-03-31 15​:48​:02 America/New_York

  [BUG FIXES]

  - mirror() now uses binmode during output (RT #67118) [Serguei Trouchelle]

  [DOCUMENTATION]

  - noted that SSL certificates are not verified against CA's
  (RT #66907)


Porting/Maintainers.pl | 2 +-
cpan/HTTP-Tiny/lib/HTTP/Tiny.pm | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)

Inline Patch
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 00728e9..0c73d10 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -984,7 +984,7 @@ use File::Glob qw(:case);
     'HTTP::Tiny' =>
 	{
 	'MAINTAINER'	=> 'dagolden',
-	'DISTRIBUTION'	=> 'DAGOLDEN/HTTP-Tiny-0.011.tar.gz',
+	'DISTRIBUTION'	=> 'DAGOLDEN/HTTP-Tiny-0.012.tar.gz',
 	'FILES'		=> q[cpan/HTTP-Tiny],
 	'EXCLUDED'	=> [
 				't/200_live.t',
diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
index 3ceabf9..b4f6bd7 100644
--- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
+++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
@@ -9,7 +9,7 @@
 #
 package HTTP::Tiny;
 BEGIN {
-  $HTTP::Tiny::VERSION = '0.011';
+  $HTTP::Tiny::VERSION = '0.012';
 }
 use strict;
 use warnings;
@@ -62,6 +62,7 @@ sub mirror {
     my $tempfile = $file . int(rand(2**31));
     open my $fh, ">", $tempfile
         or Carp::croak(qq/Error: Could not open temporary file $tempfile for downloading: $!/);
+    binmode $fh;
     $args->{data_callback} = sub { print {$fh} $_[0] };
     my $response = $self->request('GET', $url, $args);
     close $fh
@@ -759,7 +760,7 @@ HTTP::Tiny - A small, simple, correct HTTP/1.1 client
 
 =head1 VERSION
 
-version 0.011
+version 0.012
 
 =head1 SYNOPSIS
 
@@ -1015,6 +1016,8 @@ always be set to C<close>.
 
 Direct C<https> connections are supported only if L<IO::Socket::SSL> is
 installed.  There is no support for C<https> connections via proxy.
+Any SSL certificate that matches the host is accepted -- SSL certificates
+are not verified against certificate authorities.
 
 =item *
 
-- 
1.7.1

Flags​:
  category=library
  severity=high


Site configuration information for perl 5.12.3​:

Configured by david at Sat Mar 12 04​:45​:12 EST 2011.

Summary of my perl5 (revision 5 version 12 subversion 3) configuration​:
 
  Platform​:
  osname=linux, osvers=2.6.35-27-generic, archname=x86_64-linux
  uname='linux vulcan 2.6.35-27-generic #48-ubuntu smp tue feb 22 20​:25​:46 utc 2011 x86_64 gnulinux '
  config_args='-de -Dprefix=/home/david/perl5/perlbrew/perls/perl-5.12.3'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.4.5', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
  libs=-lnsl -ldl -lm -lcrypt -lutil -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
  libc=/lib/libc-2.12.1.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.12.1'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Locally applied patches​:
 


@​INC for perl 5.12.3​:
  /home/david/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux
  /home/david/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3
  /home/david/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/x86_64-linux
  /home/david/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3
  .


Environment for perl 5.12.3​:
  HOME=/home/david
  LANG=en_US.utf8
  LANGUAGE (unset)
  LC_COLLATE=C
  LC_CTYPE=en_US.UTF-8
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/david/perl5/perlbrew/bin​:/home/david/perl5/perlbrew/perls/current/bin​:~/bin​:~/git/utility-scripts​:/opt/perl/current/bin​:/home/david/bin​:/usr/local/sbin​:/usr/local/bin​:/usr/sbin​:/usr/bin​:/sbin​:/bin​:/usr/games​:.
  PERLBREW_PATH=/home/david/perl5/perlbrew/bin​:/home/david/perl5/perlbrew/perls/current/bin
  PERLBREW_PERL=perl-5.12.3
  PERLBREW_ROOT=/home/david/perl5/perlbrew
  PERLBREW_VERSION=0.17
  PERL_BADLANG (unset)
  PERL_EXTUTILS_AUTOINSTALL=--defaultdeps
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Mar 31, 2011

@xdg - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Mar 31, 2011

From @xdg

Hrmmph. In retrospect, I shouldn't have followed the "Super Quick Patch
Guide" in perlhack, maybe. I've cleaned up the title in perlbug and I'm
attaching the patch as a file as well.

-- David

@p5pRT
Copy link
Author

p5pRT commented Mar 31, 2011

From @xdg

0001-Update-HTTP-Tiny-to-CPAN-version-0.012.patch
From 82baa73fd3d59e6a277f0c8e15c82abaef824353 Mon Sep 17 00:00:00 2001
From: David Golden <dagolden@cpan.org>
Date: Thu, 31 Mar 2011 15:59:44 -0400
Subject: [PATCH] Update HTTP::Tiny to CPAN version 0.012

HTTP::Tiny 0.011 fails to mirror files correctly on MSWin32, preventing
CPAN bootstrapping over HTTP with just core Perl.  This is fixed in CPAN
version 0.012.

[DELTA]

0.012     2011-03-31 15:48:02 America/New_York

  [BUG FIXES]

  - mirror() now uses binmode during output (RT #67118) [Serguei Trouchelle]

  [DOCUMENTATION]

  - noted that SSL certificates are not verified against CA's
    (RT #66907)
---
 Porting/Maintainers.pl          |    2 +-
 cpan/HTTP-Tiny/lib/HTTP/Tiny.pm |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 00728e9..0c73d10 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -984,7 +984,7 @@ use File::Glob qw(:case);
     'HTTP::Tiny' =>
 	{
 	'MAINTAINER'	=> 'dagolden',
-	'DISTRIBUTION'	=> 'DAGOLDEN/HTTP-Tiny-0.011.tar.gz',
+	'DISTRIBUTION'	=> 'DAGOLDEN/HTTP-Tiny-0.012.tar.gz',
 	'FILES'		=> q[cpan/HTTP-Tiny],
 	'EXCLUDED'	=> [
 				't/200_live.t',
diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
index 3ceabf9..b4f6bd7 100644
--- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
+++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
@@ -9,7 +9,7 @@
 #
 package HTTP::Tiny;
 BEGIN {
-  $HTTP::Tiny::VERSION = '0.011';
+  $HTTP::Tiny::VERSION = '0.012';
 }
 use strict;
 use warnings;
@@ -62,6 +62,7 @@ sub mirror {
     my $tempfile = $file . int(rand(2**31));
     open my $fh, ">", $tempfile
         or Carp::croak(qq/Error: Could not open temporary file $tempfile for downloading: $!/);
+    binmode $fh;
     $args->{data_callback} = sub { print {$fh} $_[0] };
     my $response = $self->request('GET', $url, $args);
     close $fh
@@ -759,7 +760,7 @@ HTTP::Tiny - A small, simple, correct HTTP/1.1 client
 
 =head1 VERSION
 
-version 0.011
+version 0.012
 
 =head1 SYNOPSIS
 
@@ -1015,6 +1016,8 @@ always be set to C<close>.
 
 Direct C<https> connections are supported only if L<IO::Socket::SSL> is
 installed.  There is no support for C<https> connections via proxy.
+Any SSL certificate that matches the host is accepted -- SSL certificates
+are not verified against certificate authorities.
 
 =item *
 
-- 
1.7.1

@p5pRT
Copy link
Author

p5pRT commented Apr 1, 2011

From @xdg

Applied to blead as commit b06ddfb per
email instructions from Jesse Vincent.

@p5pRT
Copy link
Author

p5pRT commented Apr 1, 2011

From [Unknown Contact. See original ticket]

Applied to blead as commit b06ddfb per
email instructions from Jesse Vincent.

@p5pRT
Copy link
Author

p5pRT commented Apr 1, 2011

@xdg - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant