summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-11-11 14:50:39 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-11-11 14:50:39 +0100
commit16afc315b88661fd9cb15f97d886cac221287564 (patch)
tree0e96c3ca4835a78e27a1e7abfc905816ac1d9938
parent2643e4e881eb11c1ca1fbd551ce60f035a32007b (diff)
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 <tklauser@distanz.ch>
-rw-r--r--geoip.c4
1 files changed, 2 insertions, 2 deletions
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;