bugGNU Wget - Bugs: bug #23544, Option to supply alternative...

 
 

bug #23544: Option to supply alternative default names to index.html

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Thu 12 Jun 2008 06:41:31 AM UTC  
 
Category: Feature RequestSeverity: 3 - Normal
Priority: 9 - ImmediateStatus: Fixed
Privacy: PublicAssigned to: Micah Cowan <micahcowan>
Originator Name: Open/Closed: Closed
Release: NoneOperating System: None
Reproducibility: NoneFixed Release: 1.12
Planned Release: 1.12Regression: None
Work Required: NonePatch Included: Yes

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 04 Aug 2008 05:43:47 AM UTC, comment #4:

Pushed for mainline in 0e3c5cca9348.

Micah Cowan <micahcowan>In charge of this item.
Fri 01 Aug 2008 10:38:24 PM UTC, comment #3:

Needs Changelog and NEWS.

Micah Cowan <micahcowan>In charge of this item.
Tue 29 Jul 2008 09:15:08 PM UTC, comment #2:

(Assuming proper changes on main.c, init.c and options.h)

diff -r d27e06e0e404 src/url.c
--- a/src/url.c Tue Jul 22 13:33:42 2008 -0700
+++ b/src/url.c Tue Jul 29 22:13:44 2008 +0100
@@ -1430,10 +1430,16 @@ url_file_name (const struct url *u)

const char u_file, u_query;
char fname, unique;
+ char index_filename = "index.html"; / The default index file is index.html */

fnres.base = NULL;
fnres.size = 0;
fnres.tail = 0;
+
+ /* If an alternative index file was defined, change index_filename */
+ if (opt.index_file)
+ index_filename = opt.index_file;
+

/* Start with the directory prefix, if specified. */
if (opt.dir_prefix)
@@ -1476,7 +1482,7 @@ url_file_name (const struct url *u)
/* Add the file name. */
if (fnres.tail)
append_char ('/', &fnres);
- u_file = *u->file ? u->file : "index.html";
+ u_file = *u->file ? u->file : index_filename;
append_uri_pathel (u_file, u_file + strlen (u_file), false, &fnres);

/* Append "?query" to the file name. */

Joao Fernando Ferreira <jff>
Tue 29 Jul 2008 08:46:19 PM UTC, comment #1:

Do you have any suggestions for the option syntax?

The option --index seems ok to me:

wget --index default.html http://host

The longer --index-file may be more suitable, though.

***

Anyway, I suppose that this feature amounts to add the respective option variables and then change line 1479 in url.c

Joao Fernando Ferreira <jff>
Thu 12 Jun 2008 06:41:31 AM UTC, original submission:

Say, index.htm, or default.html.

Micah Cowan <micahcowan>In charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #16224:  23544.patch added by jff (3KiB - text/x-diff - patch for --default-page)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jff (Posted a comment)
  • -unavailable- added by micahcowan (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 15 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 04 Aug 2008 05:43:47 AM UTCmicahcowanStatusReady for Merge=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.12
    Fri 01 Aug 2008 10:49:55 PM UTCjffAttached File-=>Added 23544.patch, #16224
    Fri 01 Aug 2008 10:49:04 PM UTCjffAttached File#16212=>Removed
    Fri 01 Aug 2008 10:38:24 PM UTCmicahcowanPriority4=>9 - Immediate
      StatusConfirmed=>Ready for Merge
      Assigned toNone=>micahcowan
      Planned Release1.15=>1.12
      Work Required0 - Hours=>None
      Patch IncludedNone=>Yes
    Tue 29 Jul 2008 09:30:48 PM UTCjffAttached File-=>Added 23544.patch, #16212
    Tue 29 Jul 2008 09:28:09 PM UTCjffAttached File#16211=>Removed
    Tue 29 Jul 2008 09:23:28 PM UTCjffAttached File-=>Added 23544.patch, #16211
    Thu 12 Jun 2008 06:42:21 AM UTCmicahcowanPriority5 - Normal=>4

    Back to the top


    Powered by Savane 3.1-cleanup1