function parseRequest(sServiceBase, sRequest) {
				var iBodySeparator = sRequest.indexOf("\r\n\r\n"),
					aLines,
					aMatches,
					oRequest = {requestHeaders : {}};

				oRequest.requestBody = sRequest.slice(iBodySeparator + 4, sRequest.length - 2);
				sRequest = sRequest.slice(0, iBodySeparator);
				aLines = sRequest.split("\r\n");
				oRequest.requestLine = aLines.shift();
				aMatches = rRequestLine.exec(oRequest.requestLine);
				if (aMatches) {
					oRequest.method = aMatches[1];
					oRequest.url = sServiceBase + aMatches[2];
					aLines.forEach(function (sLine) {
						var aMatches = rHeaderLine.exec(sLine);
						if (aMatches) {
							oRequest.requestHeaders[aMatches[1]] = aMatches[2];
						}
					});
				}
				return oRequest;
			}
// Parses the request string of a batch into an object matching the Sinon request object
Parses the request string of a batch into an object matching the Sinon request object
Parses the request string of a batch into an object matching the Sinon request object
function parseRequest(sServiceBase, sRequest) {
				var iBodySeparator = sRequest.indexOf("\r\n\r\n"),
					aLines,
					aMatches,
					oRequest = {requestHeaders : {}};
				oRequest.requestBody = sRequest.slice(iBodySeparator + 4, sRequest.length - 2);
				sRequest = sRequest.slice(0, iBodySeparator);
				aLines = sRequest.split("\r\n");
				oRequest.requestLine = aLines.shift();
				aMatches = rRequestLine.exec(oRequest.requestLine);
				if (aMatches) {
					oRequest.method = aMatches[1];
					oRequest.url = sServiceBase + aMatches[2];
					aLines.forEach(function (sLine) {
						var aMatches = rHeaderLine.exec(sLine);
						if (aMatches) {
							oRequest.requestHeaders[aMatches[1]] = aMatches[2];
						}
					});
				}
				return oRequest;
			}
function parseRequest ( sServiceBase , sRequest ) { var iBodySeparator = sRequest . indexOf ( "\r\n\r\n" ) , aLines , aMatches , oRequest = { requestHeaders : { } } ; oRequest . requestBody = sRequest . slice ( iBodySeparator + 4 , sRequest . length - 2 ) ; sRequest = sRequest . slice ( 0 , iBodySeparator ) ; aLines = sRequest . split ( "\r\n" ) ; oRequest . requestLine = aLines . shift ( ) ; aMatches = rRequestLine . exec ( oRequest . requestLine ) ; if ( aMatches ) { oRequest . method = aMatches [ 1 ] ; oRequest . url = sServiceBase + aMatches [ 2 ] ; aLines . forEach ( function ( sLine ) { var aMatches = rHeaderLine . exec ( sLine ) ; if ( aMatches ) { oRequest . requestHeaders [ aMatches [ 1 ] ] = aMatches [ 2 ] ; } } ) ; } return oRequest ; }
Parses the request string of a batch into an object matching the Sinon request object
Parses the request string of a batch into an object matching the Sinon request object