Perl Monk, Perl Meditation | |
PerlMonks |
IO::Socket::SSL is not downloading full data from HTTPS URL in Windows ActiveState Perl.by sam_bakki (Pilgrim) |
on Jan 21, 2015 at 11:10 UTC ( [id://1114014]=perlquestion: print w/replies, xml ) | Need Help?? |
sam_bakki has asked for the wisdom of the Perl Monks concerning the following question: Dear Monks,
One uses the Net::SSL and downloads data properly from Server
My environment Script 1 - Using Net::SSL and Crypt::SSLeay - Working
Output1:
USING Net::SSL INFO: Got URL: https://developer.apple.com/standards/qtff-2001.pdf INFO: Save in File: qtff-2001.pdf INFO: qtff-2001.pdf Size: 5465.48046875 KB INFO: qtff-2001.pdf MD5 Sum: d1aee95cc06d529e67b707257a5cf3eb Loaded Modules ------------------- Carp 1.3301 Compress::Raw::Bzip2 2.068 Compress::Raw::Zlib 2.068 Compress::Zlib 2.068 Crypt::SSLeay 0.72 Crypt::SSLeay::CTX none Crypt::SSLeay::MainContext none Crypt::SSLeay::X509 none Data::Dumper 2.154 Digest::base 1.16 Digest::MD5 2.53 Encode 2.67 Encode::Alias 2.18 Encode::Config 2.05 Encode::Encoding 2.07 Errno 1.2003 Exporter 5.70 Exporter::Heavy 5.70 Fcntl 1.11 File::Glob 1.23 File::GlobMapper 1.000 File::Slurp 9999.19 HTML::Entities 3.69 HTML::Form 6.03 HTML::Parser 3.71 HTML::PullParser 3.57 HTML::Tagset 3.20 HTML::TokeParser 3.69 HTTP::Config 6.00 HTTP::Cookies 6.01 HTTP::Cookies::Netscape 6.00 HTTP::Date 6.02 HTTP::Headers 6.05 HTTP::Headers::Util 6.03 HTTP::Message 6.06 HTTP::Request 6.00 HTTP::Request::Common 6.04 HTTP::Response 6.04 HTTP::Status 6.03 IO 1.31 IO::Compress::Adapter::Deflate 2.068 IO::Compress::Base 2.068 IO::Compress::Base::Common 2.068 IO::Compress::Gzip 2.068 IO::Compress::Gzip::Constants 2.068 IO::Compress::RawDeflate 2.068 IO::Compress::Zlib::Constants 2.068 IO::Compress::Zlib::Extra 2.068 IO::File 1.16 IO::Handle 1.35 IO::Seekable 1.1 IO::Socket 1.37 IO::Socket::INET 1.35 IO::Socket::IP 0.35 IO::Socket::UNIX 1.26 IO::Uncompress::Adapter::Bunzip2 2.068 IO::Uncompress::Adapter::Inflate 2.068 IO::Uncompress::Base 2.068 IO::Uncompress::Bunzip2 2.068 IO::Uncompress::Gunzip 2.068 IO::Uncompress::Inflate 2.068 IO::Uncompress::RawInflate 2.068 List::Util 1.41 LWP 6.08 LWP::MemberMixin none LWP::Protocol 6.06 LWP::Protocol::http none LWP::Protocol::https 6.06 LWP::UserAgent 6.06 MIME::Base64 3.14 Net::HTTP 6.07 Net::HTTP::Methods 6.07 Net::HTTPS 6.04 Net::SSL 2.86 POSIX 1.38_03 Scalar::Util 1.41 SelectSaver 1.02 Socket 2.016 Storable 2.51 Symbol 1.07 Tie::Hash 1.05 Time::Local 1.2300 URI 1.65 URI::Escape 3.31 URI::http none URI::https none URI::_generic none URI::_query none URI::_server none WWW::Mechanize 1.73 Script 2 - Using IO::Socket::SSL - Not Working. Only part of the PDF file is downloaded
Output2:
USING IO::Socket::SSL INFO: Got URL: https://developer.apple.com/standards/qtff-2001.pdf INFO: Save in File: qtff-2001.pdf INFO: qtff-2001.pdf Size: 6.66796875 KB INFO: qtff-2001.pdf MD5 Sum: 4049c364f7332790c3abe548d6a4297c Loaded Modules ---------------- ActivePerl::Config none Carp 1.3301 Compress::Raw::Bzip2 2.068 Compress::Raw::Zlib 2.068 Compress::Zlib 2.068 Cwd 3.48 Data::Dumper 2.154 Digest::base 1.16 Digest::MD5 2.53 Encode 2.67 Encode::Alias 2.18 Encode::Byte 2.04 Encode::Config 2.05 Encode::Encoding 2.07 Encode::Locale 1.03 Errno 1.2003 Exporter 5.70 Exporter::Heavy 5.70 Fcntl 1.11 File::Basename 2.85 File::Glob 1.23 File::GlobMapper 1.000 File::Slurp 9999.19 File::Spec 3.48 File::Spec::Unix 3.48 File::Spec::Win32 3.48 HTML::Entities 3.69 HTML::Form 6.03 HTML::Parser 3.71 HTML::PullParser 3.57 HTML::Tagset 3.20 HTML::TokeParser 3.69 HTTP::Config 6.00 HTTP::Cookies 6.01 HTTP::Cookies::Netscape 6.00 HTTP::Date 6.02 HTTP::Headers 6.05 HTTP::Headers::Util 6.03 HTTP::Message 6.06 HTTP::Request 6.00 HTTP::Request::Common 6.04 HTTP::Response 6.04 HTTP::Status 6.03 IO 1.31 IO::Compress::Adapter::Deflate 2.068 IO::Compress::Base 2.068 IO::Compress::Base::Common 2.068 IO::Compress::Gzip 2.068 IO::Compress::Gzip::Constants 2.068 IO::Compress::RawDeflate 2.068 IO::Compress::Zlib::Constants 2.068 IO::Compress::Zlib::Extra 2.068 IO::File 1.16 IO::Handle 1.35 IO::Seekable 1.1 IO::Socket 1.37 IO::Socket::INET 1.35 IO::Socket::IP 0.35 IO::Socket::SSL 2.010 IO::Socket::SSL::PublicSuffix none IO::Socket::UNIX 1.26 IO::Uncompress::Adapter::Bunzip2 2.068 IO::Uncompress::Adapter::Inflate 2.068 IO::Uncompress::Base 2.068 IO::Uncompress::Bunzip2 2.068 IO::Uncompress::Gunzip 2.068 IO::Uncompress::Inflate 2.068 IO::Uncompress::RawInflate 2.068 List::Util 1.41 LWP 6.08 LWP::MemberMixin none LWP::Protocol 6.06 LWP::Protocol::http none LWP::Protocol::https 6.06 LWP::UserAgent 6.06 Mozilla::CA 20141217 Net::HTTP 6.07 Net::HTTP::Methods 6.07 Net::HTTPS 6.04 Net::SSLeay 1.66 POSIX 1.38_03 Scalar::Util 1.41 SelectSaver 1.02 Socket 2.016 Socket6 0.25 Storable 2.51 Symbol 1.07 Tie::Hash 1.05 Time::Local 1.2300 URI 1.65 URI::Escape 3.31 URI::http none URI::https none URI::_generic none URI::_idna none URI::_punycode 1.65 URI::_query none URI::_server none Win32::API 0.79 Win32::API::Struct 0.65 Win32::API::Type 0.69 Win32::Console 0.10 WWW::Mechanize 1.73 I did not paste the Dumper output because its huge and not properly copied to browser because of the binary contents. Q: Why IO::Socket::SSL is not downloading full data? What more should I need to do in Script 2. Update: Added Module versions Update1: I have tested the Script2 in Linux Fedora 21, x64, Perl 5.18, It's is working fine :). So this looks like only problem in Windows + ActiveState Perl :(
Thanks & Regards,
Back to
Seekers of Perl Wisdom
|
|