diff options
-rw-r--r-- | src/gns/gnunet-gns-proxy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index fb02295c8..cf1901de1 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -1965,7 +1965,7 @@ create_response (void *cls, | |||
1965 | us = MHD_lookup_connection_value (con, | 1965 | us = MHD_lookup_connection_value (con, |
1966 | MHD_HEADER_KIND, | 1966 | MHD_HEADER_KIND, |
1967 | MHD_HTTP_HEADER_CONTENT_LENGTH); | 1967 | MHD_HTTP_HEADER_CONTENT_LENGTH); |
1968 | if ( (1 == sscanf (us, | 1968 | if ( (NULL != us) && (1 == sscanf (us, |
1969 | "%ld", | 1969 | "%ld", |
1970 | &upload_size)) && | 1970 | &upload_size)) && |
1971 | (upload_size >= 0) ) | 1971 | (upload_size >= 0) ) |
@@ -1973,6 +1973,10 @@ create_response (void *cls, | |||
1973 | curl_easy_setopt (s5r->curl, | 1973 | curl_easy_setopt (s5r->curl, |
1974 | CURLOPT_INFILESIZE, | 1974 | CURLOPT_INFILESIZE, |
1975 | upload_size); | 1975 | upload_size); |
1976 | } else { | ||
1977 | curl_easy_setopt (s5r->curl, | ||
1978 | CURLOPT_INFILESIZE, | ||
1979 | upload_size); | ||
1976 | } | 1980 | } |
1977 | } | 1981 | } |
1978 | } | 1982 | } |