bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] [PATCH] Rewrite shorthand urls when read from files


From: Rohit Mathulla
Subject: [Bug-wget] [PATCH] Rewrite shorthand urls when read from files
Date: Wed, 29 Aug 2012 21:29:31 +0530

Hi, 

Wget terminates with a scheme missing error when the input file contains
shorthand urls. This patch rewrites the url if its in shorthand form. 

This is my first patch, so please let me know if I need to do anything more.

Thanks,
Rohit

---
 src/html-url.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/html-url.c b/src/html-url.c
index 55563e2..79c996e 100644
--- a/src/html-url.c
+++ b/src/html-url.c
@@ -804,6 +804,13 @@ get_urls_file (const char *file)
           url_text = merged;
         }
 
+                       char *new_url = rewrite_shorthand_url (url_text);
+                       if (new_url)
+                               {
+                                       xfree (url_text);
+                                       url_text = new_url;
+                               }
+
       url = url_parse (url_text, &up_error_code, NULL, false);
       if (!url)
         {
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]