# New Ticket Created by  Paweł Pabian 
# Please include the string:  [perl #109306]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=109306 >


Run following P6 listener:

perl6 -e 'my $l = IO::Socket::INET.new( input-line-separator => "\r\n", 
localport => 8080, :listen); while my $c = $l.accept() { for ^10 { 
$c.get().encode().gist.say; }; $c.close }'

Then call it with P5 client:

perl -e 'use LWP::UserAgent; 
LWP::UserAgent->new->post("http://localhost:8080";);'


Listener will print:

Buf:0x<50 4f 53 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d>
Buf:0x<54 45 3a 20 64 65 66 6c 61 74 65 2c 67 7a 69 70 3b 71 3d 30 2e 33 0d>
Buf:0x<43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 54 45 2c 20 63 6c 6f 73 65 0d>
Buf:0x<48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a 38 30 38 30 0d>
Buf:0x<55 73 65 72 2d 41 67 65 6e 74 3a 20 6c 69 62 77 77 77 2d 70 65 72 6c 2f 
36 2e 30 32 0d>
Buf:0x<43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 30 0d>
Buf:0x<43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 
6e 2f 78 2d 77 77 77 2d 66 6f 72 6d 2d 75 72 6c 65 6e 63 6f 64 65 64 0d>
Buf:0x<0d>

As you can see carriage return (0x0D) is present in get() output despite fact 
that it was defined as line separator.

Reply via email to