libnhttp/nhttp/protocol/http_header.cpp
/**
	* stringify header to generate http request.
	* @returns false if name not set.
	*/
stringify header to generate http request.
@returns false if name not set.
stringify header to generate http request . @returns false if name not set .
bool http_header::stringify(std::string& out_string, bool with_crlf) const {
		if (!name.size())
			return false;
		if (value.size()) {
			out_string.append(name);
			out_string.append(": ", 2);
			out_string.append(value);
			if (with_crlf)
				out_string.append("\r\n", 2);
		}
		return true;
	}
bool http_header :: stringify ( std :: string & out_string , bool with_crlf ) const { if ( ! name . size ( ) ) return false ; if ( value . size ( ) ) { out_string . append ( name ) ; out_string . append ( " " , 2 ) ; out_string . append ( value ) ; if ( with_crlf ) out_string . append ( " \r \n " , 2 ) ; } return true ; }
stringify header to generate http request.
stringify header to generate http request .