From 1dc0bc9b00e90e0b156dc86efd1733334ee9c359 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 18 Oct 2010 11:06:10 +0200 Subject: [PATCH] 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 --- src/httphelper.cpp | 2 +- src/ip_addr_helper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(); -- 1.7.1