Posted by Daniel Tryba on 06/28/05 12:18
Lisa Pearlson <no@spam.plz> wrote:
> Transfer-Encoding: chunked
>
> c
> Hello World!
> 0
>
> - Where do the 'c' and '0' come from? '0' just denoting the end of the data?
That is the chunked transfer encoding. See RFC 2616. Can be solved by
either supplying a content-length or by making http/1.0 requests instead
of http/1.1
> - How do I prevent HTTP headers sent back to the client? I wish to only send
> "Hello World!", without any headers. The reason is that the client will be a
> piece of hardware that expects binary data as response, not HTTP headers.
> I don't think this can be done with PHP, as it is probably handled by
> apache.
Then don't use a http daemon. You can run a serversocket with PHP and
have your system connect to that. OR you could simple evolve your
embedded system to understand HTTP. If the client makes a HTTP/1.0
request it can simply ignore output till after the first \r\n\r\n
sequence.
Navigation:
[Reply to this message]
|