Net-HTTPS-NB

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Net::HTTPS::NB.

0.15  Thu Aug 25 23:42:24 NOVT 2016
       - Add SNI support (gh #1)

0.14  Wed Oct 14 19:08:57 NOVT 2015
       - Fix reading of the chunked body
       - Fix examples in the documentation
       - Fix compatibility with IO::Socket::IP backend for IO::Socket::SSL

0.13  Wed Jun 12 21:31:43 2013
       - Fix for rt #85931: ability to specify SSL_* options

0.12  Tue Jun  7 18:49:45 2011
       - Test::More dependency added
       - tests fixes: OpenBSD doesn't know how to connect to 0.0.0.0

0.11  Mon May 23 13:54:47 2011
      - Assign properly value to $HTTP_ERROR when socket connection fails

META.json  view on Meta::CPAN

         }
      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "Exporter" : "0",
            "IO::Socket::SSL" : "0.98",
            "Net::HTTP" : "0",
            "Net::HTTPS" : "0",
            "Test::More" : "0.88"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "repository" : {
         "url" : "https://github.com/olegwtf/p5-Net-HTTPS-NB"

META.yml  view on Meta::CPAN

meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Net-HTTPS-NB
no_index:
  directory:
    - t
    - inc
requires:
  Exporter: '0'
  IO::Socket::SSL: '0.98'
  Net::HTTP: '0'
  Net::HTTPS: '0'
  Test::More: '0.88'
resources:
  repository: https://github.com/olegwtf/p5-Net-HTTPS-NB
version: 0.15
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL  view on Meta::CPAN

use 5.005000;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    NAME              => 'Net::HTTPS::NB',
    LICENSE           => 'perl',
    VERSION_FROM      => 'lib/Net/HTTPS/NB.pm', # finds $VERSION
    PREREQ_PM         => { Exporter => 0, IO::Socket::SSL => 0.98, Net::HTTP => 0, Net::HTTPS => 0, Test::More => 0.88 },
    META_MERGE        => { resources => {repository => 'https://github.com/olegwtf/p5-Net-HTTPS-NB'} },
    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM  => 'lib/Net/HTTPS/NB.pm', # retrieve abstract from module
       AUTHOR         => 'Oleg G <oleg@cpan.org>') : ()),
);

lib/Net/HTTPS/NB.pm  view on Meta::CPAN

package Net::HTTPS::NB;

use strict;
use Net::HTTP;
use IO::Socket::SSL 0.98;
use Exporter;
use Errno qw(EWOULDBLOCK EAGAIN);
use vars qw($VERSION @ISA @EXPORT $HTTPS_ERROR);

$VERSION = 0.15;

=head1 NAME

Net::HTTPS::NB - Non-blocking HTTPS client

lib/Net/HTTPS/NB.pm  view on Meta::CPAN

=over

=item If read_response_headers() did not see enough data to complete the headers an empty list is returned. 

=item If read_entity_body() did not see new entity data in its read the value -1 is returned.

=back

=cut

# we only supports IO::Socket::SSL now
# use it force
$Net::HTTPS::SSL_SOCKET_CLASS = 'IO::Socket::SSL';
require Net::HTTPS;

# make aliases to IO::Socket::SSL variables and constants
use constant {
	HTTPS_WANT_READ  => SSL_WANT_READ,
	HTTPS_WANT_WRITE => SSL_WANT_WRITE,
};
*HTTPS_ERROR = \$SSL_ERROR;

=head1 PACKAGE CONSTANTS

Imported by default



( run in 0.574 second using v1.01-cache-2.11-cpan-05444aca049 )