agent/browser/ie/pagetest/PagetestReporting.cpp
/*-----------------------------------------------------------------------------
	Helper method that extracts the next HTTP header, and advances 
	inout_headerPos to the index of the start of the next HTTP header.
-----------------------------------------------------------------------------*/
Helper method that extracts the next HTTP header, and advances
inout_headerPos to the index of the start of the next HTTP header.
Helper method that extracts the next HTTP header and advances inout_headerPos to the index of the start of the next HTTP header .
bool GetNextHttpHeader(const CString& headers, int* inout_headerPos, CString* out_tag, CString* out_value) 
{
	CString line = headers.Tokenize(_T("\r\n"), *inout_headerPos);
	line = line.Trim();
	if( *inout_headerPos < 0 )
	{
		return false;
	}
	int separator = line.Find(_T(':'));
	if( separator <= 0 )
	{
		return false;
	}
	*out_tag = line.Left(separator).Trim();
	*out_value = line.Mid(separator + 1).Trim();
	return !out_tag->IsEmpty();
}
bool GetNextHttpHeader ( const CString & headers , int * inout_headerPos , CString * out_tag , CString * out_value ) { CString line = headers . Tokenize ( _T ( " \r \n " ) , * inout_headerPos ) ; line = line . Trim ( ) ; if ( * inout_headerPos < 0 ) { return false ; } int separator = line . Find ( _T ( ' ' ) ) ; if ( separator <= 0 ) { return false ; } * out_tag = line . Left ( separator ) . Trim ( ) ; * out_value = line . Mid ( separator + 1 ) . Trim ( ) ; return ! out_tag -> IsEmpty ( ) ; }
Helper method that extracts the next HTTP header, and advances
inout_headerPos to the index of the start of the next HTTP header.
Helper method that extracts the next HTTP header and advances inout_headerPos to the index of the start of the next HTTP header .