docs: function updateContentType(httpData, unzipData){
      var responseHeaders = httpData.responseHeaders,  contentType = responseHeaders['content-type'];
      var type = null , charset = null;
      var match;
      if(contentType !== undefined){
          match = contentType.toLowerCase().match(/^([^;]+)(?:;\s*charset\s*=\s*(.+))?$/);
          if(match !== null){
              if(mimeMaps[match[1]] !== undefined){
                  type = mimeMaps[match[1]];
              }
              if(match[2] !== undefined){
                  charset = match[2];
              }
          }
      }
      if(type === null){
          match = httpData.path.toLowerCase().match(/\.([^\?\.]+)(\?|$)/);
          if(match !== null && extMaps[match[1]] !== undefined){
              type = extMaps[match[1]];
          }
      }
      if(type !== null){
          httpData.responseType = type;
      }
  
      //文本类型且无gzip状态下才检测charset
      var responseData = unzipData || httpData.responseData;
      if(responseData.length > 0 && type !== null && /^(html|css|js|json|txt|xml)$/.test(type) === true){
          //检测BOM
          var b0=responseData[0],b1=responseData[1],b2=responseData[2];
          if(b0===0xff && b1===0xfe){
              charset='unicode';
          }
          else if(b0===0xfe && b1===0xff){
              charset='utf-16be';
          }
          else if(b0===0xef && b1===0xbb && b2===0xbf){
              charset='utf-8';
          }
          //HTML中匹配charset
          if(charset === null && type === 'html'){
              var htmlTest = responseData.toString('utf-8', 0, 1000);
              match = htmlTest.match(/<meta(\s+[^>]*?)?\s+http-equiv\s*=\s*"?\s*Content-Type\s*"?(\s+[^>]*?)?>/i);
              if(match !== null && (match=match[0].match(/;\s*charset\s*=\s*([^"']+)/i))) charset=match[1];
              if(charset === null && (match=htmlTest.match(/<meta(?:\s+[^>]*?)?\s+charset\s*=\s*"([^"]*)"(?:\s+[^>]*?)?>/i))) charset = match[1];
          }
          //UTF-8特征扫描
          if( charset === null && isUTF8Bytes(responseData) === true){
              charset = 'utf-8';
          }
          httpData.responseCharset = charset ?  charset : 'gbk';
      }
  }