Tue 28 Aug 2012 07:05:52 PM UTC, original submission:
Version : wget 1.11.4 on Windows 7 64 bit (Home Premium)
Issue : When adding log parameters (-o and -O) and an url with %3A (:) is used, the url is corrupted, logs show the "%3A" changed to "A", wget tries to retrieve url using the corrupt url.
Apologies if this is due to my stupidity or if it's something very obvious, I don't have much experience with this application and various OS quirks.
Trying to automatize some tasks on a personal site based on Mediawiki.
The URL I have problems with is in the following form (domain and IP anonymized in the outputs below):
http://www.example.org/gameswiki/index.php?search=102+Dalmatians%3A+Puppies+To+The+Rescue&go=Go&title=Special%3ASearch
When running from the command line, everything works correctly:
wget "http://www.example.org/gameswiki/index.php?search=102+Dalmatians%3A+Puppies+To+The+Rescue&go=Go&title=Special%3ASearch"
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
--2012-08-28 21:40:16-- http://www.example.org/gameswiki/index.php?search=102+Dalmatians%3A+Puppies+To+The+Rescue&go=Go&title=Special%3ASearch
Resolving http://www.example.org... #.#.#.#
Connecting to http://www.example.org|#.#.#.#|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.example.org/games/102_Dalmatians:_Puppies_To_The_Rescue [following]
--2012-08-28 21:40:17-- http://www.example.org/games/102_Dalmatians:_Puppies_To_The_Rescue
Reusing existing connection to http://www.example.org:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `102_Dalmatians%3A_Puppies_To_The_Rescue.2'
So as you can see wget detects the redirect and retrieves the page from the right URL.
However, when adding the log output and log to file commands the URL gets messed up: "%3A" gets converted to "A" in the URL
command:
wget "http://www.example.org/gameswiki/index.php?search=102+Dalmatians%3A+Puppies+To+The+Rescue&go=Go&title=Special%3ASearch" -o .\log\d0\2 -O .\out\d0\2.out
and here's the result:
2.out:
--2012-08-28 21:31:07-- http://www.example.org/gameswiki/index.php?search=102+DalmatiansA+Puppies+To+The+Rescue&go=Go&title=SpecialASearch
Resolving http://www.example.org... #.#.#.#
Connecting to http://www.example.org|#.#.#.#|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `./out/d0/2.out'
0K .......... . 127M=0s
2012-08-28 21:31:08 (127 MB/s) - `./out/d0/2.out' saved [11285]
The saved output is also the incorrect one... page says "search results for 102 DalmationsA Puppies..."
--
Is there some special parameters to be used in Windows that I'm not aware of so that the URLs won't get corrupted when activating the logging?
Thank you for your help, it's very appreciated.
|