Subject: | HTTP POST requests over 90kb fail with OpenSSL 1.0.2 |
I've had a hard time nailing this issue down as to where its actually going wrong.
All the facts I know are, that this issue was not present on 1.0.1l, and is present on 1.0.2
Under 1.0.2 , https://metacpan.org/source/ETHER/libwww-perl-6.13/lib/LWP/Protocol/http.pm#L282 <-- this line fails when the socket is an IO::Socket::SSL socket.
Using an MITM to unwrap the SSL and provide plain HTTP to the same requests results in no error.
Downgrading openssl to 1.0.1l also results in no error.
The error dies with $! being "write failed: Bad address" which is a C Level error to do with bad pointers ( usually ).
And I've found similar issues with similar upload thresholds triggering the same Bad address error on ruby projects ( https://github.com/excon/excon/issues/467 )
But there's no obvious smoking gun, there's no related articles I can see at OpenSSL's official forums, so at best I might assume there's some kind of ABI missmatch 1.0.2 introduces that needs to be adjusted for.
Unfortunately I don't know what other data might be helpful in replicating this issue, other than to say that uploading the following files to PAUSE using cpan-uploader ( LWP -> IO::Socket::SSL -> Net::SSLeay ) reliably replicated the failure, and circumvention was required to get uploads working:
https://cpan.metacpan.org/authors/id/K/KE/KENTNL/Color-Library-Dictionary-XKCD-1.000000.tar.gz
https://cpan.metacpan.org/authors/id/K/KE/KENTNL/Dist-Zilla-PluginBundle-Author-KENTNL-2.024001.tar.gz
https://cpan.metacpan.org/authors/id/K/KE/KENTNL/Dist-Zilla-PluginBundle-Author-KENTNL-2.024000.tar.gz