Subversion Repositories DevTools

Rev

Rev 6121 | Rev 6176 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6121 Rev 6146
Line 2017... Line 2017...
2017
Function testArchiveAccessPkg(pkgName, pkgVersion)
2017
Function testArchiveAccessPkg(pkgName, pkgVersion)
2018
  Dim oXMLHTTP
2018
  Dim oXMLHTTP
2019
  Dim testUrl
2019
  Dim testUrl
2020
 
2020
 
2021
  testArchiveAccessPkg = False
2021
  testArchiveAccessPkg = False
2022
  testUrl = dpkg_archiveURL
2022
  testUrl = HTTP_PKG_ARCHIVE
-
 
2023
 
-
 
2024
  testUrl = testUrl & "/cgi-bin/testPackage.pl"
2023
  If pkgName <> "" Then
2025
  If pkgName <> "" Then
2024
      testUrl = testUrl & pkgName & "/" & pkgVersion
2026
      testUrl = testUrl & "?path=" &  pkgName & "/" & pkgVersion
2025
  End If
2027
  End If
2026
  Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.3.0")
2028
  Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.3.0")
2027
 
2029
 
2028
  ' Use error handling in case dpkg_archive is not available
2030
  ' Use error handling in case dpkg_archive is not available
2029
  ' Use HEAD to test existence
2031
  ' Use HEAD to test existence
2030
  Err.Clear
2032
  Err.Clear
2031
  On Error Resume Next
2033
  On Error Resume Next
2032
  oXMLHTTP.Open "HEAD", testUrl, False
2034
  oXMLHTTP.Open "GET", testUrl, False
2033
  oXMLHTTP.Send
2035
  oXMLHTTP.Send
2034
 
2036
 
2035
  ' Do not combine the next two If statments - it will not work
2037
  ' Do not combine the next two If statments - it will not work
2036
  If Err.Number = 0  Then
2038
  If Err.Number = 0  Then
2037
    If oXMLHTTP.Status = 200 Then 
2039
    If oXMLHTTP.Status = 200 Then 
-
 
2040
        If InStr(1,oXMLHTTP.responseText, "::FOUND::", 1) = 1 Then
2038
        testArchiveAccessPkg = True
2041
            testArchiveAccessPkg = True
-
 
2042
        End If
2039
    End If
2043
    End If
2040
  End If
2044
  End If
-
 
2045
 
2041
  On Error Goto 0
2046
  On Error Goto 0
2042
End Function
2047
End Function
2043
 
2048
 
2044
'--------------------------------------------------------------------------------------------------------------------------
2049
'--------------------------------------------------------------------------------------------------------------------------
2045
' Like Cint, but handles NULL by replacing it with a default value
2050
' Like Cint, but handles NULL by replacing it with a default value