1 # NOTE: Derived from blib/lib/Net/SSLeay.pm.
2 # Changes made here will be lost when autosplit is run again.
6 #line 2385 "blib/lib/Net/SSLeay.pm (autosplit into blib/lib/auto/Net/SSLeay/http_cat.al)"
7 sub http_cat { # address, port, message --> returns reply / (reply,errs,cert)
8 my ($dest_serv, $port, $out_message) = @_;
9 my ($got, $errs, $written);
11 ($got, $errs) = open_proxy_tcp_connection($dest_serv, $port);
12 return (wantarray ? (undef, $errs) : undef) unless $got;
14 ### Connected. Exchange some data (doing repeated tries if necessary).
16 warn "http_cat $$: sending " . blength($out_message) . " bytes...\n"
18 warn "http_cat $$: sending `$out_message' (" . blength($out_message)
19 . " bytes)...\n" if $trace>3;
20 ($written, $errs) = tcp_write_all($out_message);
21 goto cleanup unless $written;
23 warn "waiting for reply...\n" if $trace>2;
24 ($got, $errs) = tcp_read_all(200000);
25 warn "Got " . blength($got) . " bytes.\n" if $trace==3;
26 warn "Got `$got' (" . blength($got) . " bytes)\n" if $trace>3;
30 return wantarray ? ($got, $errs) : $got;
33 # end of Net::SSLeay::http_cat