| 
	
 | 
 Posted by Boldgeek on 01/16/07 21:45 
Here is the HTTP request sent by the app: 
 
POST testresults.php HTTP/1.1 
Host: www.(mydomain).org 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) 
Gecko/20061204 Firefox/2.0.0.1 
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 
Accept-Language: en-gb,en-us;q=0.7,en;q=0.3 
Accept-Encoding: gzip,deflate 
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 
Keep-Alive: 300 
Connection: keep-alive 
Content-Type: multipart/form-data; 
boundary=---------------------------265001916915724 
Content-Length: 364 
-----------------------------265001916915724 
Content-Disposition: form-data; name="name" 
 
test2 
-----------------------------265001916915724 
Content-Disposition: form-data; name="description" 
 
This is a test 
-----------------------------265001916915724 
Content-Disposition: form-data; name="cmd" 
 
Submit 
-----------------------------265001916915724-- 
 
 
 
I've copied this as exactly as possible from the HTTP request sent by 
the forms version (I used a Firefox plugin called Live HTTP Headers to 
capture the headers) Note: There is a blank line at the end after the 
final boundary. 
 
The server response is : 
Bad Request 
Your browser sent a request that this server could not understand. 
Request header field is missing colon separator. 
 
 
-----------------------------265001916915724 
 
 
Below is the HTTP request submitted by the form (copied from Live HTTP 
Headers) which works fine. 
 
POST /testresults.php HTTP/1.1 
Host: www.(mydomain).org 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) 
Gecko/20061204 Firefox/2.0.0.1 
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 
Accept-Language: en-gb,en-us;q=0.7,en;q=0.3 
Accept-Encoding: gzip,deflate 
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 
Keep-Alive: 300 
Connection: keep-alive 
Referer: http://www.(mydomain).org/testform.php 
Content-Type: multipart/form-data; 
boundary=---------------------------77877924991 
Content-Length: 364 
-----------------------------77877924991 
Content-Disposition: form-data; name="name" 
 
form test 
-----------------------------77877924991 
Content-Disposition: form-data; name="description" 
 
this is a test of the form 
-----------------------------77877924991 
Content-Disposition: form-data; name="cmd" 
 
Submit 
-----------------------------77877924991-- 
 
 
Now the only differences I can detect are the referrer (which has no 
relevance to this particular application) and the boundary string. As a 
test previously I've copied the same boundary string just to be certain 
and there are no differences. Each line is terminated by "\r\n" as it 
should be. 
 
Thanks guys, your help is much appreciated.
 
[Back to original message] 
 |