A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.
To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).
Validator.nu Form Upload Input: Difference between revisions
(Try again) |
(Extensions) |
||
Line 1: | Line 1: | ||
To use [[Validator.nu Web Service Interface|Validator.nu as a Web service]] by form-based file upload, the client issues an HTTP request either to <code>http://validator.nu/</code> or <code>http://html5.validator.nu/</code> using the POST method with an <code>multipart/form-data</code> entity body. [[Validator.nu Common Input Parameters|Common parameters]] are encoded as form fields. The document to check is included as the value of a file upload field called <code>file</code>. The <code>file</code> field must be the last field in the submission. | To use [[Validator.nu Web Service Interface|Validator.nu as a Web service]] by form-based file upload, the client issues an HTTP request either to <code>http://validator.nu/</code> or <code>http://html5.validator.nu/</code> using the POST method with an <code>multipart/form-data</code> entity body. [[Validator.nu Common Input Parameters|Common parameters]] are encoded as form fields. The document to check is included as the value of a file upload field called <code>file</code>. The <code>file</code> field must be the last field in the submission. | ||
Since the <code>Content-Type</code> supplied by browsers for the uploaded file is unreliable, the client-supplied <code>Content-Type</code> is overridden with a synthetic <code>Content-Type</code> if the filename is supplied ''and'' it has a well-known extension. The well-known extensions are <code>html</code>, <code>htm</code>, <code>xhtml</code>, <code>xht</code>, <code>atom</code>, <code>rng</code>, <code>xsl</code>, <code>xml</code> and <code>dbk</code>. | |||
The parameter field values must decode as UTF-8. | The parameter field values must decode as UTF-8. |
Revision as of 17:27, 27 November 2007
To use Validator.nu as a Web service by form-based file upload, the client issues an HTTP request either to http://validator.nu/
or http://html5.validator.nu/
using the POST method with an multipart/form-data
entity body. Common parameters are encoded as form fields. The document to check is included as the value of a file upload field called file
. The file
field must be the last field in the submission.
Since the Content-Type
supplied by browsers for the uploaded file is unreliable, the client-supplied Content-Type
is overridden with a synthetic Content-Type
if the filename is supplied and it has a well-known extension. The well-known extensions are html
, htm
, xhtml
, xht
, atom
, rng
, xsl
, xml
and dbk
.
The parameter field values must decode as UTF-8.