var _ = require('../util').lodash,
    PropertyList = require('./property-list').PropertyList,
    Header = require('./header').Header,

    E = '',
    CRLF = '\r\n',
    PROP_NAME = '_postman_propertyName',

    HeaderList;

_.inherit((

    /**
    * Contains a list of header elements
    *
    * @constructor
    * @param {Object} parent
    * @param {Header[]} headers
    * @extends {PropertyList}
    */
    HeaderList = function (parent, headers) {
        // this constructor is intended to inherit and as such the super constructor is required to be executed
        HeaderList.super_.call(this, Header, parent, headers);
    }), PropertyList);

_.assign(HeaderList.prototype, /** @lends HeaderList.prototype */ {
    /**
     * Gets size of a list of headers excluding standard header prefix.
     *
     * @returns {Number}
     */
    contentSize: function () {
        if (!this.count()) { return 0; }

        var raw = E;
        raw += Header.unparse(this, CRLF);
        raw += (CRLF + CRLF);
        return raw.length;
    }
});

_.assign(HeaderList, /** @lends HeaderList */ {
    /**
     * Defines the name of this property for internal use.
     * @private
     * @readOnly
     * @type {String}
     */
    _postman_propertyName: 'HeaderList',

    /**
     * Checks if the given object is a HeaderList
     *
     * @param {*} obj
     * @returns {Boolean}
     */
    isHeaderList: function (obj) {
        return Boolean(obj) && ((obj instanceof HeaderList) ||
          _.inSuperChain(obj.constructor, PROP_NAME, HeaderList._postman_propertyName));
    }
});

module.exports = {
    HeaderList: HeaderList
};

@@ -881,106 +881,368 @@
     
-if (!this.count()) %7B return 0; %7D%0A%0A        var raw = E;%0A        raw += Header.unparse(this, 
+var raw = E;%0A%0A        // *( header-field CRLF )%0A        raw += this.reduce(function (acc, header) %7B%0A            // unparse header only if it has a valid key and is not disabled%0A            if (header && header.key && !header.disabled) %7B%0A                acc.push(Header.unparseSingle(header));%0A            %7D%0A%0A            return acc;%0A        %7D, %5B%5D).join(
 CRLF);%0A
+%0A
     
@@ -1256,22 +1256,14 @@
  += 
-(
 CRLF
- + CRLF)
 ;
+%0A
 %0A   

Handle disabled headers in HeaderList~contentSize