> ID: 9280
> Updated by: sniper
> Reported By: [EMAIL PROTECTED]
> Old-Status: Open
> Status: Feedback
> Bug Type: Apache related
> Operating system: 
> PHP Version: 4.0.4pl1
> Assigned To: 
> Comments:
> 
> Do you have any example script that can be used to reproduce
> this behaviour? (I'm being lazy here.. :)

First I created a simple PHP script which does nothing.  I've
called it "null.php" and it's in the root of my servers.  It
contains simply:

<BODY>
hello
</BODY>

Now to test, I telnet to the web server port.  First I connect to
the machine with a stock PHP (4.0.4pl1) on it, and paste in the
following:

POST /null.php HTTP/1.1
Host: yellow.datatote.co.uk
Content-Type: application/x-www-form-urlencoded
Content-Length: 3
Accept: */*
Expect: 100-continue

Now I add an extra blank line after the Expect: header.  Nothing
happens.

Next I connect to the machine with my modified PHP on it, and
paste in:

POST /null.php HTTP/1.1
Host: etweb_qa.datatote.co.uk
Content-Type: application/x-www-form-urlencoded
Content-Length: 3
Accept: */*
Expect: 100-continue

Now I add an extra blank line after the Expect: header.  The
web server responds with:

HTTP/1.1 100 Continue

This is as per the HTTP 1.1 spec (RFC 2068, section 8.2).

To check that this behaviour is definitely PHP related, I created
a dummy perl script (similar to the PHP one above) and return to
the http port of the original machine (with unmodified PHP) and
paste in:

POST /cgi-bin/null.pl HTTP/1.1
Host: yellow.datatote.co.uk
Content-Type: application/x-www-form-urlencoded
Content-Length: 3
Accept: */*
Expect: 100-continue

Adding an extra blank line after the Expect: produces the correct
"HTTP/1.1 100 Continue" line.

This may not be quite what you wanted, but it should give you
all the information you need to see the fault and to see that the
fix works.

Note that the two servers mentioned above are not publically
accessible (sorry - development machines).  I can provide public
access to a null.php on a box with my patched PHP if that is any
help.

Also,  we originally spotted this bug because someone was trying
to use a standard URL fetch method using JRE 1.3 (I'm not a Java
programmer so I don't know offhand what the method was).

Hoep this helps,

Paul.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to