Skip to content

Commit a163dbb

Browse files
authored
Using UseBasicParsing for every request
1 parent 0f2266d commit a163dbb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

php/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ RUN $download_page = Invoke-WebRequest -UseBasicParsing -Uri 'http://windows.php
1414
$re = 'php-\d.+-nts.+x64\.zip$'; \
1515
$url = $download_page.links | ? href -match $re | % href | select -First 1; \
1616
$filename = $url.Substring(20); \
17-
$checksums = Invoke-WebRequest -Uri 'http://windows.php.net/downloads/releases/sha1sum.txt'; \
17+
$checksums = Invoke-WebRequest -UseBasicParsing -Uri 'http://windows.php.net/downloads/releases/sha1sum.txt'; \
1818
$sumpattern = '([0-9A-F]+)\s+'+$filename; \
1919
$checksums.Content.Split(\"`n\") | Select-String -Pattern $sumpattern | %{ $sum = $_.Matches[0].Groups[1].Value.ToUpper() }; \
2020
$fullurl = 'http://windows.php.net' + $url; \
21-
Invoke-WebRequest -Uri $fullurl -OutFile php.zip; \
21+
Invoke-WebRequest -UseBasicParsing -Uri $fullurl -OutFile php.zip; \
2222
if ((Get-FileHash php.zip -Algorithm sha1).Hash -ne $sum) {exit 1} ; \
2323
Expand-Archive -Path php.zip -DestinationPath c:\php; \
2424
[Environment]::SetEnvironmentVariable('PATH', $env:Path + ';C:\php', [EnvironmentVariableTarget]::Machine); \

0 commit comments

Comments
 (0)