W3C home > Mailing lists > Public > www-validator@w3.org > February 2003

Re: Need HTTP help for validator access script

From: Liam Quinn <liam@htmlhelp.com>
Date: Thu, 27 Feb 2003 22:26:40 -0500 (EST)
To: Steve Clay <steve@mrclay.org>
cc: www-validator@w3.org
Message-ID: <Pine.LNX.4.44.0302272219330.21447-100000@localhost.localdomain>

On Thu, 27 Feb 2003, Steve Clay wrote:

> I made a PHP script to allow validation of limited-access URIs, such
> as those on an intranet or home test server.  The idea:
> 
> * Access URI locally (given by querystring)
> * Save contents to variable
> * Make variable look like "file upload" POST headers
> * Submit variable to validator
> * Echo validator's response
> 
> A bookmarklet could make this a one-click process.
> 
> What I have: http://mrclay.org/vd.phps
> 
> The problem is that the headers I put together (learned by using
> http://livehttpheaders.mozdev.org/ and the HTML specs) are malformed
> and I can't seem to troubleshoot it.  My failures to get cURL to
> install were pitiful, but it looks like it'd be overkill for this anyway.

You need to use \r\n instead of \n.  You need to specify a valid HTTP
version such as 1.0 or 1.1 rather than 1.x.  You need an extra newline
before the first boundary ("--AaB03x") since the first boundary belongs in
the message body rather than the headers.

Watching what other browsers do using a tool like Ethereal
(http://www.ethereal.com/) can be helpful to clear up any confusion you
might have after reading the relevant specification.

-- 
Liam Quinn
Received on Thursday, 27 February 2003 22:26:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:05 GMT