RFR: 8331164: createJMHBundle.sh download jars fail when url needed to be redirected
    SendaoYan 
    syan at openjdk.org
       
    Mon Apr 29 17:56:11 UTC 2024
    
    
  
On Fri, 26 Apr 2024 03:32:25 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi,
> 
>   The curl command lack of "-L" option, cause download file fail, the size of download file is empty.
> 
>   curl download fail without `-L`:
>    ```log
>> rm -rf jmh-core-1.37.jar ; curl -O --fail https://maven.aliyun.com/repository/public/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar ; ls -lh jmh-core-1.37.jar ; du -sh jmh-core-1.37.jar 
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
> -rw-rw-r-- 1 yansendao yansendao 0 Apr 26 17:37 jmh-core-1.37.jar
> 0       jmh-core-1.37.jar
> 
> 
>   curl download success with `-L`:
> 
>> rm -rf jmh-core-1.37.jar ; curl -OL --fail https://maven.aliyun.com/repository/public/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar ; ls -lh jmh-core-1.37.jar ; du -sh jmh-core-1.37.jar 
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
> 100  540k  100  540k    0     0  1097k      0 --:--:-- --:--:-- --:--:-- 1097k
> -rw-rw-r-- 1 yansendao yansendao 541K Apr 26 17:38 jmh-core-1.37.jar
> 544K    jmh-core-1.37.jar
> 
> 
> 
>   Only change devkit shell script, the risk is low.
> /sponsor
@shipilev  Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18965#issuecomment-2083317843
    
    
More information about the build-dev
mailing list