-
Notifications
You must be signed in to change notification settings - Fork 63
A problem with idlneturl__define.pro (spawn, cmd, result, blahblah) #1465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi thanks for the report. |
Thank you! Yes, really. In basic_pro.cpp (Line 1835), there is a such conversion: std::replace(cmd.begin(), cmd.end(), '/', '\\'); Therefore, the string http://www.http2demo.io/ is converted to http:\\www.http2demo.io\. Trying curl in a command line:
And get:
Is this conversion required? Users should know what kind of slash symbols ('/' or '') to use... |
Yes the call passes OK on unix/linux and probably OSX as well. |
Tested in IDL Version 8.5.1, Microsoft Windows (Win32 x86_64 m64):
Works perfectly. |
Thank you! I've tested the build after branches merging and execution of the command works now. Nevertheless, n_bytes function (idlneturl__define.pro, Line 49) is missing in GDL standard library. I used it from https://idlastro.gsfc.nasa.gov/ftp/pro/misc/n_bytes.pro P.S. I can't fully test all idlneturl__define module now due to errors in the program I'm trying to run. :( Upd.: Line 99 should be (curl under Windows accept only "-quotes): if strlen((*self.headers)[i]) gt 0 then curl_cmd+='-H "'+strtrim((*self.headers)[i],2)+'" ' Line 178 should be (failed when output file name contained spaces): curl_asyn_get_all='curl -L --progress-bar -o "'+filename+'" ' ; will use progressbar values, but alas need output in external file. Line 209 should be (like in a previous case): curl_syn='curl -L --silent --show-error -o "'+filename+'" ' P.P.S.
|
@Albom yes open a new issue for FILE_CHMOD, please. Besides, thanks for the tips above for a better idlneturl__define.pro Concerning n_bytes, many gdl users have added idlastro to their !PATH, including the gdl maintainers, so this dependency passed unnoticed. The procedure should be modified as the use of n_bytes is not really needed there. |
One more line (131) in idlneturl__define.pro should be changed to: curl_asyn_get_headers+='--write-out "\n%{size_header}\n%{content_type}\n%{response_code}\n%{size_download}" ' ; we get some useful values |
changes done. thanks! |
@GillesDuvert @Albom let's add a test so that this is actually ensured on our Windows CI builds! |
An error occurs in idlneturl__define.pro file (line 134).
Trying:
Get in eee:
Get in result:
Running in a command line (cmd):
curl -LI --silent --show-error --include --write-out "\n%{size_header}\n%{content_type}\n%{response_code}\n%{size_download}" http://www.http2demo.io/
Get:
curl 7.78.0 (x86_64-pc-win32) is in PATH. Another version of curl was also tried. The result is the same.
OS is Windows 11 Home 21H2.
The text was updated successfully, but these errors were encountered: