Sorry to be late again, I was occupied with another work.
(B
(B> Do you have control of the server-side program ? If so,
(B
(Bno.
(B
(B> When I use
(B> application/bang-gzip as the content type, it goes out
(B> in binary (not base64 encoded), so I'm not sure why yours
(B> is encoding it.
(B
(BI got it.
(BMy code didn't use HTTP:Request::Common,
(B
(Bmy $resp = $ua->post(
(B 'http://localhost/secom/servlet/AcceptServlet',
(B [
(B $bufTmp,
(B ],
(B "Content-Type" => "application/bang-gzip; charset=MS932",
(B "Content-Length" => $gzlen,
(B "Host" => "127.0.0.1",
(B "Accept" => "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2",
(B "Connection" => "keep-alive",
(B ":content_file" => $outXML,
(B);
(B
(Bnot,
(B
(Bmy $ua = LWP::UserAgent->new;
(Bmy $url = 'http://localhost/mytest/servlet/AcceptServlet';
(Bmy $req = POST $url, Content_Type => 'application/bang-gzip',
(B Content => $bufTmp;
(Bmy $res = $ua->request($req);
(B
(B
(BI'm not sure why these produce different outputs.
(BThe later code is more convenient...
(B
(BNow I understood the way, but I'm failing even now, 'cause
(BLWP/HTTP module sends request headers with 'CRLF'.
(BBut server-side program coded in Java cannot read my request
(Bwith 'CRLF', which I tested with script using socket program
(Bsending with 'LF' only.
(BIt is unfaire as web's HTTP but the Java fail to read multi-byte strings.
(BSo now I'm searching the way to let LWP/HTTP module to send LF only.
(BIs it possible?
(BWill I change HTTP:Request::Common?
(Bmy $CRLF = "\015\012"; # "\r\n" is not portable
(Bto
(Bmy $CRLF = "\012"; # "\n" is not portable
(B
(BAnyway thanks for info...
(B
(BRegards,
(BHirosi Taguti
(B[EMAIL PROTECTED]
(B
(B_______________________________________________
(BPerl-Win32-Users mailing list
([email protected]
(BTo unsubscribe: http://listserv.ActiveState.com/mailman/mysubs