mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-18 06:06:50 -06:00
Merge pull request #1181 from andizzle/checklink_bugfix
fix a small bug that could stop the check link process.
This commit is contained in:
commit
a16f12d268
1 changed files with 7 additions and 5 deletions
|
|
@ -52,11 +52,13 @@ class Cask::LinkChecker
|
|||
case cask.url.scheme
|
||||
when 'http', 'https' then
|
||||
@response_status = response_lines.grep(/^HTTP/).last
|
||||
http_headers = response_lines[(response_lines.index(@response_status)+1)..-1]
|
||||
http_headers.each { |line|
|
||||
header_name, header_value = line.split(': ')
|
||||
@headers[header_name] = header_value
|
||||
}
|
||||
unless response_lines.index(@response_status).nil?
|
||||
http_headers = response_lines[(response_lines.index(@response_status)+1)..-1]
|
||||
http_headers.each { |line|
|
||||
header_name, header_value = line.split(': ')
|
||||
@headers[header_name] = header_value
|
||||
}
|
||||
end
|
||||
when 'ftp' then
|
||||
@response_status = 'OK'
|
||||
response_lines.each { |line|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue