Connecting Tech Pros Worldwide Forums | Help | Site Map

sending http responses....

harikris@gmail.com
Guest
 
Posts: n/a
#1: Jun 2 '08
Hi All,

I want to be able to respond to certain http client requests without
the webserver meddling with it.
How can i achieve that in php?

When i am use the header() function to send in the status line, like
header('HTTP/1.1 206 Partial Content'), i just want the webserver to
send it RAW or UN-TOUCHED to the client without adding some other
headers like "Connection: Close" on it's own.

I am using Cherokee webserver. I can transition to a different server
if need be.

I am using PHP version 5.2.4

One more thing - How do i make both the header and the content/body
go in the same IP/TCP datatgram/packet? When i wrap the header() and
echo() with ob_start() and ob_end_flush(), i expected the http headers
and the body to get delivered to the client as one packet (the payload
length is less then 1448 bytes in this case). But that's not what i
see when i sniff the traffic.

Thanks in advance.

Jerry Stuckle
Guest
 
Posts: n/a
#2: Jun 2 '08

re: sending http responses....


harikris@gmail.com wrote:
Quote:
Hi All,
>
I want to be able to respond to certain http client requests without
the webserver meddling with it.
How can i achieve that in php?
>
When i am use the header() function to send in the status line, like
header('HTTP/1.1 206 Partial Content'), i just want the webserver to
send it RAW or UN-TOUCHED to the client without adding some other
headers like "Connection: Close" on it's own.
>
I am using Cherokee webserver. I can transition to a different server
if need be.
>
I am using PHP version 5.2.4
>
One more thing - How do i make both the header and the content/body
go in the same IP/TCP datatgram/packet? When i wrap the header() and
echo() with ob_start() and ob_end_flush(), i expected the http headers
and the body to get delivered to the client as one packet (the payload
length is less then 1448 bytes in this case). But that's not what i
see when i sniff the traffic.
>
Thanks in advance.
>
You can't do either. The web server will always be involved, no matter
what the programming language. And you can never guarantee how data
will be passed in the packets.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

tez1966@googlemail.com
Guest
 
Posts: n/a
#3: Jun 2 '08

re: sending http responses....


On Apr 15, 8:56*pm, "harik...@gmail.com" <harik...@gmail.comwrote:
Quote:
Hi All,
>
*I want to be able to respond to certain http client requests without
the webserver meddling with it.
*How can i achieve that in php?
>
*When i am use the header() function to send in the status line, like
header('HTTP/1.1 206 Partial Content'), i just want the webserver to
send it RAW or UN-TOUCHED to the client without adding some other
headers like "Connection: Close" on it's own.
>
*I am using Cherokee webserver. I can transition to a different server
if need be.
>
*I am using PHP version 5.2.4
>
*One more thing - How do i make both the header and the content/body
go in the same IP/TCP datatgram/packet? When i wrap the header() and
echo() with ob_start() and ob_end_flush(), i expected the http headers
and the body to get delivered to the client as one packet (the payload
length is less then 1448 bytes in this case). But that's not what i
see when i sniff the traffic.
>
*Thanks in advance.


Certainly sounds like an interesting project, what is it you want to
achieve? Have you considered writing your own simple web server where
you can set some of the rules yourself?



*** PHP Programming in the North East of England
web: www.programmer4hire.co.uk <http://www.programmer4hire.co.uk***

Jerry Stuckle
Guest
 
Posts: n/a
#4: Jun 2 '08

re: sending http responses....


tez1966@googlemail.com wrote:
Quote:
On Apr 15, 8:56 pm, "harik...@gmail.com" <harik...@gmail.comwrote:
Quote:
>Hi All,
>>
> I want to be able to respond to certain http client requests without
>the webserver meddling with it.
> How can i achieve that in php?
>>
> When i am use the header() function to send in the status line, like
>header('HTTP/1.1 206 Partial Content'), i just want the webserver to
>send it RAW or UN-TOUCHED to the client without adding some other
>headers like "Connection: Close" on it's own.
>>
> I am using Cherokee webserver. I can transition to a different server
>if need be.
>>
> I am using PHP version 5.2.4
>>
> One more thing - How do i make both the header and the content/body
>go in the same IP/TCP datatgram/packet? When i wrap the header() and
>echo() with ob_start() and ob_end_flush(), i expected the http headers
>and the body to get delivered to the client as one packet (the payload
>length is less then 1448 bytes in this case). But that's not what i
>see when i sniff the traffic.
>>
> Thanks in advance.
>
>
>
Certainly sounds like an interesting project, what is it you want to
achieve? Have you considered writing your own simple web server where
you can set some of the rules yourself?
>
>
>
*** PHP Programming in the North East of England
web: www.programmer4hire.co.uk <http://www.programmer4hire.co.uk***
>
>
He'd also have to write his own TCP/IP so he can control what goes into
the packets.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Closed Thread