W3C home > Mailing lists > Public > www-validator@w3.org > March 2013

validator won't return json

From: Trenton D. Adams <trenton.d.adams@gmail.com>
Date: Fri, 1 Mar 2013 18:45:01 -0700
Message-ID: <CAMg8Y2oC6JniD-AqAEo0mwSLZTVhWT57zCjV8q_JAsaHViUUJQ@mail.gmail.com>
To: www-validator@w3.org
Before I file a bug, I thought I would ask why this does not work.  I sent
the output=json, and then url encoded the uploaded_file as well.  I know
http://validator.w3.org/docs/api.html#soap12format says that the
uploaded_file should be multi-part form-data, but that also did not seem to
return the json; unless I got the syntax wrong.  If I use the "uri" option
instead, it appears to work fine.  In either of the two failed cases, there
are special headers returned indicating that the validation of the fragment
failed, how many errors, how many warnings, etc.

Any help would be appreciated, thank you.


http://validator.w3.org/check

POST /check HTTP/1.1
Host: validator.w3.org
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101
Firefox/16.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language:
en-CA,en;q=0.9,en-US;q=0.8,en-gb;q=0.7,en-US-x-Hixie;q=0.6,fr-FR;q=0.4,fr;q=0.3,eo-EO;q=0.2,eo;q=0.1

Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer:
http://reuben.pc.athabascau.ca:8080/aucm/servlet/DispatcherServlet?action=examRequest
Content-Length: 17174
Origin: http://reuben.pc.athabascau.ca:8080
Pragma: no-cache
Cache-Control: no-cache
output=json&uploaded_file=%0A%0A%0A%0A%0A%0A%0A%0A%3Cblah-blah-encoded-fragment


HTTP/1.1 200 OK
Date: Sat, 02 Mar 2013 01:34:11 GMT
Server: Apache/2.2.16 (Debian)
X-W3C-Validator-Recursion: 1
X-W3C-Validator-Status: Invalid
X-W3C-Validator-Errors: 4
X-W3C-Validator-Warnings: 23
Content-Type: application/json; charset=UTF-8
Connection: close
Transfer-Encoding: chunked
Received on Saturday, 2 March 2013 21:45:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 2 March 2013 21:46:00 GMT