This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Hi everyone, It seems that the JSON output is leaking headers into the main content. Headers such as: X-W3C-Validator-Recursion are printed as part of the response causing programs to fail and complain about invalid JSON. Tested using the following content as test.html: <!DOCTYPE html> <html lang="en"> <head> <title>title</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> </head> <body> </body> </html> And the following curl command: curl -sF "uploaded_file=@test.html;type=text/html" -F output=json http://validator.w3.org/check The output I get is: Status: 302 Found Location: https://validator.w3.org/nu/?doc=test.html&out=json Content-Type: application/json; charset=UTF-8 X-W3C-Validator-Recursion: 1 X-W3C-Validator-Status: Valid X-W3C-Validator-Errors: 0 X-W3C-Validator-Warnings: 1 { "url": "test.html", "messages": [ { "message": "The Content-Type was text/html. Using the HTML parser.", "messageid": "html5", "explanation": " <p class=\"helpwanted\">\n <a\n href=\"feedback.html?uri=;errmsg_id=html5#errormsg\"\n\ttitle=\"Suggest improvements on this error message through our feedback channels\" \n >✉</a>\n </p>\n", "type": "info" }, { "message": "Using the schema for HTML with SVG 1.1, MathML 3.0, RDFa 1.1, and ITS 2.0 support.", "messageid": "html5", "explanation": " <p class=\"helpwanted\">\n <a\n href=\"feedback.html?uri=;errmsg_id=html5#errormsg\"\n\ttitle=\"Suggest improvements on this error message through our feedback channels\" \n >✉</a>\n </p>\n", "type": "info" } ], "source": { "encoding": "utf-8", "type": "text/html" } }