From 9df1e86273d4dc7c5f5f59583b0815e75dc75576 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 23 Aug 2017 13:21:19 +0200 Subject: [PATCH] Remove double slash and add some carriage returns --- src/cdmriddir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cdmriddir.cpp b/src/cdmriddir.cpp index 5b2f5ce..21f9347 100644 --- a/src/cdmriddir.cpp +++ b/src/cdmriddir.cpp @@ -63,7 +63,7 @@ bool CDmridDir::RefreshContent(void) CBuffer buffer; // get file from xlxapi server - if ( (ok = HttpGet("xlxapi.rlx.lu", "/api/exportdmr.php", 80, &buffer)) ) + if ( (ok = HttpGet("xlxapi.rlx.lu", "api/exportdmr.php", 80, &buffer)) ) { // clear directory m_CallsignMap.clear(); @@ -207,7 +207,7 @@ bool CDmridDir::HttpGet(const char *hostname, const char *filename, int port, CB { // send the GET request char request[DMRID_HTTPGET_SIZEMAX]; - ::sprintf(request, "GET /%s HTTP/1.0\nFrom: %s\nUser-Agent: xlxd\n\n", + ::sprintf(request, "GET /%s HTTP/1.0\r\nFrom: %s\r\nUser-Agent: xlxd\r\n\r\n", filename, (const char *)g_Reflector.GetCallsign()); ::write(sock_id, request, strlen(request));