File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
test-data/recipes/sourceforge-redirects Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -715,4 +715,17 @@ requirements:
715715 assert ! ( output. contains( "No license files were copied" ) ) ;
716716 assert ! ( output. contains( "The following license files were not found: *.license" ) ) ;
717717 }
718+
719+ #[ test]
720+ fn test_sourceforge_redirects ( ) {
721+ let tmp = tmp ( "test_sourceforge_redirects" ) ;
722+ let rattler_build = rattler ( ) . build (
723+ recipes ( ) . join ( "sourceforge-redirects" ) ,
724+ tmp. as_dir ( ) ,
725+ None ,
726+ None ,
727+ ) ;
728+
729+ assert ! ( rattler_build. status. success( ) ) ;
730+ }
718731}
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ impl BaseClient {
104104 . no_gzip ( )
105105 . pool_max_idle_per_host ( 20 )
106106 . user_agent ( APP_USER_AGENT )
107+ . referer ( false )
107108 . read_timeout ( std:: time:: Duration :: from_secs ( timeout) )
108109 } ;
109110
Original file line number Diff line number Diff line change 1+ # yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json
2+ context :
3+ version : " 0.0.1"
4+
5+ package :
6+ name : sourceforge-redirect-test
7+ version : ${{ version }}
8+
9+ source :
10+ # This URL requires 3 redirects across different hosts to reach the final file:
11+ # 1. sourceforge.net -> sourceforge.net/download
12+ # 2. sourceforge.net/download -> downloads.sourceforge.net?ts=...
13+ # 3. downloads.sourceforge.net -> [mirror].dl.sourceforge.net
14+ url : https://sourceforge.net/projects/arma/files/armadillo-15.2.1.tar.xz
15+ sha256 : a5b8109da3c169802f51a14d3bd1246395c24bbca55601760b0c96a3c0b2f8fa
16+
17+ build :
18+ number : 0
19+ script :
20+ - echo "Successfully downloaded from SourceForge with cross-host redirects"
You can’t perform that action at this time.
0 commit comments