charset: d.gs(function () {
    var contentType = this.contentType, match;
    return (contentType && (match = contentType.match(/\bcharset=([\w-]+)/))) ? match[1] : null;
  }, function (value) {
    this.contentType = this.mediaType + (value ? ';charset=' + value : '');