DownloadFile with hURL only works with escaped URLs

Discuss about plugins that don't have a dedicated forum
Post Reply
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

DownloadFile with hURL only works with escaped URLs

Post by jPV »

Should hURL's high-level interface work with DownloadFile()'s Encoded option? Or is it normal that it requires manual URL escaping always? Or is there a bug with certain characters like %?

Code: Select all

@REQUIRE "hurl"

url$ = "http://jpv.amigaaa.com/test/url%20test/test%25file.txt"
DownloadFile(url$, {File = "ram:esc_holl", Encoded=False}) ; fails as expected
DownloadFile(url$, {File = "ram:esc_holl_enc", Encoded=True}) ; downloads ok as expected
DownloadFile(url$, {File = "ram:esc_hurl", Encoded=False, Adapter = "hurl"}) ; downloads ok, should it?
DownloadFile(url$, {File = "ram:esc_hurl_enc", Encoded=True, Adapter = "hurl"}) ; downloads ok as expected

url$ = "http://jpv.amigaaa.com/test/url test/test%file.txt"
DownloadFile(url$, {File = "ram:noesc_holl", Encoded=False}) ; downloads ok as expected
DownloadFile(url$, {File = "ram:noesc_holl_enc", Encoded=True}) ; fails as expected
DownloadFile(url$, {File = "ram:noesc_hurl", Encoded=False, Adapter = "hurl"}) ; fails, why?
DownloadFile(url$, {File = "ram:noesc_hurl_enc", Encoded=True, Adapter = "hurl"}) ; fails as expected
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DownloadFile with hURL only works with escaped URLs

Post by airsoftsoftwair »

Code: Select all

- Fix: The "Encoded" tag of the DownloadFile() and UploadFile() commands wasn't handled correctly by hURL
Post Reply