From: Thomas Jarosch Date: Mon, 18 Oct 2010 09:06:10 +0000 (+0200) Subject: Fix user agent. Don't output a newline after any HTTP header as curl won't filter... X-Git-Tag: v1.1~39 X-Git-Url: http://developer.intra2net.com/git/?p=bpdyndnsd;a=commitdiff_plain;h=1dc0bc9b00e90e0b156dc86efd1733334ee9c359 Fix user agent. Don't output a newline after any HTTP header as curl won't filter them and this will disrupt the HTTP request --- diff --git a/src/httphelper.cpp b/src/httphelper.cpp index 25130af..997599a 100644 --- a/src/httphelper.cpp +++ b/src/httphelper.cpp @@ -166,7 +166,7 @@ CURL* HTTPHelper::init_curl(string& curl_writedata_buff,char* curl_err_buff) { CurlInitError = CURLE_OK; ostringstream user_agent_stream; - user_agent_stream << "Intra2net AG - Bullet Proof DYNDNS Daemon - " << MAJOR_VERSION << "." << MINOR_VERSION << endl; + user_agent_stream << "Intra2net AG - Bullet Proof DYNDNS Daemon - " << MAJOR_VERSION << "." << MINOR_VERSION; string user_agent = user_agent_stream.str(); CURL *curl_easy_handle = curl_easy_init(); diff --git a/src/ip_addr_helper.cpp b/src/ip_addr_helper.cpp index 49c4b9a..3293ee1 100644 --- a/src/ip_addr_helper.cpp +++ b/src/ip_addr_helper.cpp @@ -558,7 +558,7 @@ CURLcode IPAddrHelper::set_curl_url(CURL * curl_easy_handle, const string& url) CURL * IPAddrHelper::init_curl(string& curl_writedata_buff,char* curl_err_buff) const { ostringstream user_agent_stream; - user_agent_stream << "Intra2net AG - Bullet Proof DYNDNS Daemon - " << MAJOR_VERSION << "." << MINOR_VERSION << endl; + user_agent_stream << "Intra2net AG - Bullet Proof DYNDNS Daemon - " << MAJOR_VERSION << "." << MINOR_VERSION; string user_agent = user_agent_stream.str(); CURL *curl_easy_handle = curl_easy_init();