bin/serve.js
function parseHeaders(headerString) {
	var headers = {};
	var headersArray = headerString.split(/[\r\n]+/);
	headersArray.forEach(function (headerString) {
		var headerChunks = headerString.split(':');
		headers[headerChunks.shift().trim()] = headerChunks.join(':').trim();
	});
	return headers;
}
function parseHeaders(headerString) {
	var headers = {};
	var headersArray = headerString.split(/[\r\n]+/);
	headersArray.forEach(function (headerString) {
		var headerChunks = headerString.split(':');
		headers[headerChunks.shift().trim()] = headerChunks.join(':').trim();
	});
	return headers;
}
function parseHeaders ( headerString ) { var headers = { } ; var headersArray = headerString . split ( / [\r\n]+ / ) ; headersArray . forEach ( function ( headerString ) { var headerChunks = headerString . split ( ':' ) ; headers [ headerChunks . shift ( ) . trim ( ) ] = headerChunks . join ( ':' ) . trim ( ) ; } ) ; return headers ; }
Parse a HTTP header string
Parse a HTTP header string