Page 1 of 1

DownloadFile with hURL only works with escaped URLs

Posted: Mon Apr 18, 2022 11:37 am
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

Re: DownloadFile with hURL only works with escaped URLs

Posted: Wed Apr 20, 2022 6:23 pm
by airsoftsoftwair

Code: Select all

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