From 16afc315b88661fd9cb15f97d886cac221287564 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 11 Nov 2015 14:50:39 +0100 Subject: geoip: Use correct line endings in HTTP request The lines in an HTTP request should all end with \r\n (CRLF) according to RFC 2616, so use these consistently. Signed-off-by: Tobias Klauser --- geoip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'geoip.c') diff --git a/geoip.c b/geoip.c index aa435b0..ee654a6 100644 --- a/geoip.c +++ b/geoip.c @@ -165,8 +165,8 @@ static int geoip_get_database(const char *host, int which) size_t lenl = strlen("Content-Length: "); size_t lent = strlen("HTTP/1.1 200 OK"); size_t lenc = strlen("\r\n\r\n"); - const char *http_req_fmt = "GET %s%s HTTP/1.1\n" - "Connection: close\n" + const char *http_req_fmt = "GET %s%s HTTP/1.1\r\n" + "Connection: close\r\n" "Host: %s\r\n\r\n"; again: found = good = 0; -- cgit v1.2.3-54-g00ecf