[EMAIL PROTECTED] wrote:
> Now I understood the way, but I'm failing even now, 'cause
> LWP/HTTP module sends request headers with 'CRLF'.
> But server-side program coded in Java cannot read my request
> with 'CRLF', which I tested with script using socket program
> sending with 'LF' only.
> It is unfaire as web's HTTP but the Java fail to read multi-byte strings.
The correct line ending for HTTP is CRLF not LF:
2.2 Basic Rules
The following rules are used throughout this specification to
describe basic parsing constructs. The US-ASCII coded character set
is defined by [17].
OCTET = <any 8-bit sequence of data>
CHAR = <any US-ASCII character (octets 0 - 127)>
UPALPHA = <any US-ASCII uppercase letter "A".."Z">
LOALPHA = <any US-ASCII lowercase letter "a".."z">
ALPHA = UPALPHA | LOALPHA
DIGIT = <any US-ASCII digit "0".."9">
CTL = <any US-ASCII control character
(octets 0 - 31) and DEL (127)>
CR = <US-ASCII CR, carriage return (13)>
LF = <US-ASCII LF, linefeed (10)>
SP = <US-ASCII SP, space (32)>
HT = <US-ASCII HT, horizontal-tab (9)>
<"> = <US-ASCII double-quote mark (34)>
HTTP/1.0 defines the octet sequence CR LF as the end-of-line marker
for all protocol elements except the Entity-Body (see Appendix B for
tolerant applications). The end-of-line marker within an Entity-Body
is defined by its associated media type, as described in Section 3.6.
CRLF = CR LF
> So now I'm searching the way to let LWP/HTTP module to send LF only.
Don't do that - that would be incorrect HTTP.
> Is it possible?
Anything's possible.
> Will I change HTTP:Request::Common?
> my $CRLF = "\015\012"; # "\r\n" is not portable
> to
> my $CRLF = "\012"; # "\n" is not portable
That may work, but it would be a mistake to allow the receiving
app. to modify the HTTP rules. They need to toss the \r - not
choke on it.
--
,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED]
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs