<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23196</bug_id>
          
          <creation_ts>2013-09-10 12:33:31 +0000</creation_ts>
          <short_desc>Content-Type HTTP headers lacks charset information when json format is requested</short_desc>
          <delta_ts>2013-09-10 23:20:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML Checker</product>
          <component>General</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Thomas Gambet">tgambet</reporter>
          <assigned_to name="Michael[tm] Smith">mike+validator</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>93199</commentid>
    <comment_count>0</comment_count>
    <who name="Thomas Gambet">tgambet</who>
    <bug_when>2013-09-10 12:33:31 +0000</bug_when>
    <thetext>When requesting a result as json the server does not specify a complete Content-Type header:
[ Content-Type: application/json ]

Since the content is UTF-8 the header should be:
[ Content-Type: application/json; charset=utf-8 ]

----------------

$ lwp-request -e -d  &quot;http://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.w3.org&amp;out=json&quot;
Cache-Control: no-cache
Connection: close
Date: Tue, 10 Sep 2013 12:26:18 GMT
Accept-Encoding: gzip
Server: Jetty(6.1.26)
Content-Type: application/json
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Access-Control-Allow-Origin: *
Client-Date: Tue, 10 Sep 2013 12:26:17 GMT
Client-Peer: 128.30.52.91:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93221</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2013-09-10 23:20:40 +0000</bug_when>
    <thetext>Thanks -- fixed in the sources now

https://github.com/validator/validator/commit/c2c0526cb02c605f2a543e1078ae334c717d5ea7</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>