code: function parse(headers) {
      var output = {}, i, p, k, v;
      headers = headers || '';
      headers = headers.replace('\r', '');
      headers = headers.split('\n');
      for(i = 0;i < headers.length;i++) {
        p = headers[i].indexOf(':');
        k = headers[i].substr(0, p);
        v = headers[i].substr(p + 1);
        if(k && v) {
          k = k.replace(/^\s+/, '').replace(/\s+$/, '');
          v = v.replace(/^\s+/, '').replace(/\s+$/, '');
          output[k.toLowerCase()] = v;
        }
      }
      return output;
    }
docs: /* jshint ignore:end 
  Parse response headers into an object.