-/* $Id$
-
-This file is part of libmsphttp
-Copyright © 2008 Mikkosoft Productions, Mikko Rasa
-Distributed under the LGPL
-*/
-
#include <cstdlib>
#include <msp/strings/formatter.h>
#include <msp/strings/utils.h>
{
unsigned lf = d.find('\n', start);
if(lf==string::npos)
- throw InvalidParameterValue("Incomplete response");
+ throw invalid_argument("Message::parse_headers");
if(lf==start || (d[start]=='\r' && lf==start+1))
return lf+1;
unsigned colon = d.find(':', start);
if(colon>lf)
- throw InvalidParameterValue("No colon in header");
+ throw invalid_argument("Message::parse_headers");
set_header(d.substr(start, colon-start), strip(d.substr(colon+1, lf-colon-1)));