Ruby on Rails
Tuesday, June 24, 2014
He gets that snippet from another server, the opening does not want to create a body without headers, he wants to extract the actual body out of a full HTTP-response he got from external services.
So easiest way would be to drop everything before the first (and including it) newline, the remainder is the body, as described in the HTTP-RFC...
Am 24.06.2014 20:14 schrieb "Colin Law" <clanlaw@gmail.com>:
-- On 24 June 2014 17:30, Jay Dee <lists@ruby-forum.com> wrote:
> You may think it is nonsense, W3 think otherwise. Perhaps you should
> inform them of their nonsense?
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4
>
> "message consist of a start-line, *zero* or more header fields"
>
Since it goes on to say (in 4.3) "The presence of a message-body in a
request is signaled by the inclusion of a Content-Length or
Transfer-Encoding header field in the request's message-headers" does
that not imply that if there is are no headers then there can be no
body either? I think the OP was looking for a body with no headers.
Not to be confused with a headless body which would be quite
different.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv%3D3xQrRQ%2B3pvSHxkLiY9XKZEsZD4GzJfdZ9cdkvGcV_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BbCVsv6cKESeQEdk-zWQb_oBxhzf%3DemteXEqJf_-OW6426wug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment