bugGNU Wget - Bugs: bug #52404, wget -mk run twice wrongly fixes...

 
 

bug #52404: wget -mk run twice wrongly fixes links in javascript files

Submitter:  Ben Fuchs <ben_fuchs>
Submitted:  Tue 14 Nov 2017 01:05:52 PM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  rockdaboot
Originator Name:  Angelo Fuchs Open/Closed:  Closed
Release:  1.18 Operating System:  GNU/Linux
Reproducibility:  Every Time Fixed Release:  trunk
Planned Release:  1.19.3 Regression:  None
Work Required:  None Patch Included:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 16 Nov 2017 07:16:01 PM UTC, comment #3: 

Just add --no-modified-since and Wget behaves as wanted.

Tim Ruehsen <rockdaboot>
Group administrator
Thu 16 Nov 2017 03:28:18 PM UTC, comment #2: 

I work around the problem by deleting everything prior. This is not super satisfying, but sufficient for my case.

A big nuisance here is that I need to download some pages and only after that know some other pages that I need to download, but I have a fix for that.
So, at least for me I could work around it.

What has changed between v16 and v18 that could break this?

Ben Fuchs <ben_fuchs>
Wed 15 Nov 2017 07:43:18 PM UTC, comment #1: 

The first time, the file will just download and no conversion takes place.

The second call to wget doesn't download any file (because of 304 answer) but tries to modify both ! This is wrong - as at least the .js file is neither an html nor a css file.

If you add --no-modified-since to the second call, the problem is gone. It looks like the 304 response does not contain a Content-Type - and I guess the default for Wget is text/html then.

Tim Ruehsen <rockdaboot>
Group administrator
Tue 14 Nov 2017 01:05:52 PM UTC, original submission:  

To reproduce:


wget -mk http://steamnet.de/wget_broken_in_18/
wget -mk http://steamnet.de/wget_broken_in_18/

will produce a file "js/script.js" that looks like this:

> someFunc=function(C){L=J('<a href="script.js#"></a>')}; 


but it should look like this:

> someFunc=function(C){L=J('<a href="#"></a>')}; 


This worked in Version 16

I attached the files. script.js is how it should look like and does look like in version 16. script_broken.js is how it looks like in version 18.

Ben Fuchs <ben_fuchs>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #42399:  index.html added by ben_fuchs (222B - text/html)
file #42400:  script_broken.js added by ben_fuchs (56B - application/javascript)
file #42401:  script.js added by ben_fuchs (47B - application/javascript)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rockdaboot (Posted a comment)
  • -email is unavailable- added by ben_fuchs (Submitted the item)
  •  

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-25 rockdaboot StatusNone Fixed
        Assigned toNone rockdaboot
        Open/ClosedOpen Closed
        Fixed ReleaseNone trunk
        Planned ReleaseNone 1.19.3
    2017-11-14 ben_fuchs Attached File- Added index.html, #42399
        Attached File- Added script_broken.js, #42400
        Attached File- Added script.js, #42401

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code