Hello,
I write a script by ruby where it connects to a server and communicates
with it by HTTP protocol.
When I logged my request I can see that the line end is not correct.
So the end of the lines need to have \r\n but I see \r\r\n.
It is not clear for me why? I use this script on windows and I suspect
it is OS specific problem. Here is the main part of the code regarding
this issue:
…
request = Net::HTTP::Post.new(uri.request_uri)
request.body = $post_body.join
headers = {
‘Pragma’ => “no-cache”,
.
.
.
‘Connection’ => ‘Keep-Alive’,
‘Cache-Control’ => ‘no-cache’
}
request.initialize_http_header(headers)
response = http.request(request)
– end of code —
I can see this:
POST / HTTP/1.1
“[80, 79, 83, 84, 32, 47, 32, 72, 84, 84, 80, 47, 49, 46, 49, 13, 13,
10]”
So the lineend is \r\r\n (13,13,10).
And this is same at other header and body lines.
Any idea?
Thanks in advance
Rainman