diff options
author | Bignaux Ronan <ronan@aimao.org> | 2018-11-01 22:23:55 +0100 |
---|---|---|
committer | jkoan <jkoan@users.noreply.github.com> | 2019-05-24 10:11:52 +0200 |
commit | bbff86825991abb7408abf1691118b112c83bed2 (patch) | |
tree | 4a2257eaa6aab2d71d32dfe0304824dd5b5ec4b0 /navit/file.c | |
parent | b2205d39d2864f4ed7fd3d931b2e6b8f06a6b38b (diff) | |
download | navit-bbff86825991abb7408abf1691118b112c83bed2.tar.gz |
Refactoring:cmake:simplify version management
Diffstat (limited to 'navit/file.c')
-rw-r--r-- | navit/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/navit/file.c b/navit/file.c index 4d7f226f8..8d0365499 100644 --- a/navit/file.c +++ b/navit/file.c @@ -44,8 +44,6 @@ #include <netdb.h> #endif -extern char *version; - #ifdef CACHE_SIZE static GHashTable *file_name_hash; #endif @@ -98,7 +96,8 @@ static int file_socket_connect(char *host, char *service) { } static void file_http_request(struct file *file, char *method, char *host, char *path, char *header, int persistent) { - char *request=g_strdup_printf("%s %s HTTP/1.0\r\nUser-Agent: navit %s\r\nHost: %s\r\n%s%s%s\r\n",method,path,version, + char *request=g_strdup_printf("%s %s HTTP/1.0\r\nUser-Agent: navit %s\r\nHost: %s\r\n%s%s%s\r\n",method,path, + NAVIT_VERSION, host,persistent?"Connection: Keep-Alive\r\n":"",header?header:"",header?"\r\n":""); write(file->fd, request, strlen(request)); dbg(lvl_debug,"%s",request); |