Hi Håkon,
thanks for your contribution, I have a few comments:
Håkon Vågsether <address@hidden> writes:
From dd9370f6362650a1f1a2b38577a87776da020547 Mon Sep 17 00:00:00 2001
From: H�kon V�gsether <address@hidden>
Date: Sun, 29 Dec 2013 13:27:18 +0100
Subject: [PATCH] Fixed bug #40908
please use a description of the fix itself in the subject, you can link
to the bug in the commit body though (and that is welcome).
diff --git a/src/http.c b/src/http.c
index 754b7ec..e5dcd3c 100644
--- a/src/http.c
+++ b/src/http.c
@@ -3043,7 +3043,10 @@ http_loop (struct url *u, struct url *original_url, char
**newloc,
/* Send preliminary HEAD request if -N is given and we have an existing
* destination file. */
- file_name = url_file_name (opt.trustservernames ? u : original_url, NULL);
+ if (!opt.output_document)
+ file_name = url_file_name (opt.trustservernames ? u : original_url, NULL);
+ else
+ file_name = opt.output_document;
`file_name' is freed a few lines below, so to ensure you are not freeing
`opt.output_document', you should use:
+ file_name = xstrdup (opt.output_document);
Cheers,
Giuseppe