Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot, bind-address mysql multiple, sanibleone xxxx, ftp://192.168.100.100/, www.xxxcon

Links

XODOX
Impressum

#1: sending http responses....

Posted on 2008-04-15 21:56:41 by harikris

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.

Report this message

#2: Re: sending http responses....

Posted on 2008-04-15 23:05:58 by Jerry Stuckle

harikris@gmail.com wrote:
> 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
==================

Report this message

#3: Re: sending http responses....

Posted on 2008-04-15 23:05:58 by Jerry Stuckle

harikris@gmail.com wrote:
> 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
==================

Report this message

#4: Re: sending http responses....

Posted on 2008-04-24 07:34:15 by tez1966

On Apr 15, 8:56=A0pm, "harik...@gmail.com" <harik...@gmail.com> wrote:
> Hi All,
>
> =A0I want to be able to respond to certain http client requests without
> the webserver meddling with it.
> =A0How can i achieve that in php?
>
> =A0When 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.
>
> =A0I am using Cherokee webserver. I can transition to a different server
> if need be.
>
> =A0I am using PHP version 5.2.4
>
> =A0One 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.
>
> =A0Thanks 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> ***

Report this message

#5: Re: sending http responses....

Posted on 2008-04-24 07:34:15 by tez1966

On Apr 15, 8:56=A0pm, "harik...@gmail.com" <harik...@gmail.com> wrote:
> Hi All,
>
> =A0I want to be able to respond to certain http client requests without
> the webserver meddling with it.
> =A0How can i achieve that in php?
>
> =A0When 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.
>
> =A0I am using Cherokee webserver. I can transition to a different server
> if need be.
>
> =A0I am using PHP version 5.2.4
>
> =A0One 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.
>
> =A0Thanks 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> ***

Report this message

#6: Re: sending http responses....

Posted on 2008-04-24 13:36:22 by Jerry Stuckle

tez1966@googlemail.com wrote:
> On Apr 15, 8:56 pm, "harik...@gmail.com" <harik...@gmail.com> wrote:
>> 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
==================

Report this message

#7: Re: sending http responses....

Posted on 2008-04-24 13:36:22 by Jerry Stuckle

tez1966@googlemail.com wrote:
> On Apr 15, 8:56 pm, "harik...@gmail.com" <harik...@gmail.com> wrote:
>> 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
==================

Report this message

#8: Re: sending http responses....

Posted on 2008-04-24 13:41:05 by gordon

On Apr 15, 8:56 pm, "harik...@gmail.com" <harik...@gmail.com> wrote:
> 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 might be able to use the PHP header() command to override headers
that the web server's sending with values you want, for example you
could change connection to not be close. I can't promise that would
work though as I've never tested it.

As for the packets, can't be done. TCP/IP by its nature makes no
promises about the order packets are delivered in. How could it? You
have no way of knowing the network conditions from one packet to the
next, so you can't predict how long a packet is going to take to
transmit or if it's even going to reach its destination at all. If a
packet goes astray then the client can re-request it, if they arrive
out of order then it's up to the client to reassemble them in order.
It's done this way because it's more robust than sending entire
messages in one go. If there's an error or failure part way through a
file that was being transmitted as a single entity you'd have to
transmit the entire file again.

Report this message

#9: Re: sending http responses....

Posted on 2008-04-24 13:41:05 by gordon

On Apr 15, 8:56 pm, "harik...@gmail.com" <harik...@gmail.com> wrote:
> 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 might be able to use the PHP header() command to override headers
that the web server's sending with values you want, for example you
could change connection to not be close. I can't promise that would
work though as I've never tested it.

As for the packets, can't be done. TCP/IP by its nature makes no
promises about the order packets are delivered in. How could it? You
have no way of knowing the network conditions from one packet to the
next, so you can't predict how long a packet is going to take to
transmit or if it's even going to reach its destination at all. If a
packet goes astray then the client can re-request it, if they arrive
out of order then it's up to the client to reassemble them in order.
It's done this way because it's more robust than sending entire
messages in one go. If there's an error or failure part way through a
file that was being transmitted as a single entity you'd have to
transmit the entire file again.

Report this message