Diff
Not logged in

Differences From Artifact [50ec21baae]:

To Artifact [f5323e45b7]:


1286
1287
1288
1289
1290

























1291
1292
1293
1294
1295
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320





+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+





        error "unsupported package platform" 
      } 
    } 
  } 
 
  # 
  # NOTE: This procedure checks the current login cookie to make sure that 
  #       it exists -AND- conforms to the correct format. 
  # 
  proc haveValidLoginCookie {} { 
    variable loginCookie 
 
    if {![info exists loginCookie]} then { 
      return false 
    } 
 
    if {[isEagle] || \ 
        ([info exists tcl_version] && $tcl_version >= 8.5)} then { 
      if {[string is list -strict $loginCookie]} then { 
        return false 
      } 
    } 
 
    if {[llength $loginCookie] != 2} then { 
      return false 
    } 
 
    return true 
  } 
 
  # 
  # NOTE: This procedure issues a request to an HTTP(S) server.  It returns 
  #       the raw response data verbatim.  It may raise a script error.  It 
  #       will always use the currently configured HTTP(S) login cookie, if 
  #       any; therefore, it should really only be used for requests to the 
1326
1327
1328
1329
1330
1331

1332
1333
1334
1335
1336
1351
1352
1353
1354
1355

1356
1357
1358
1359
1360
1361





-
+





        if {$code ne "Ok"} then { 
          error [getStringFromObjectHandle $error] 
        } 
      } 
 
      if {[info exists loginCookie] && [llength $loginCookie] == 2} then { 
      if {[haveValidLoginCookie]} then { 
        set script [object create String { 
          if {[methodName ToString] eq "GetWebRequest"} then { 
            webRequest Headers.Add Cookie [join $loginCookie =] 
          } 
        }] 
1343
1344
1345
1346
1347
1348

1349
1350
1351
1352
1353
1368
1369
1370
1371
1372

1373
1374
1375
1376
1377
1378





-
+





            -timeouttype network -inline -- $uri] 
      } 
    } else { 
      set options [list -binary true] 
 
      if {[info exists loginCookie] && [llength $loginCookie] == 2} then { 
      if {[haveValidLoginCookie]} then { 
        lappend options -headers [list Cookie [join $loginCookie =]] 
      } 
 
      set data [eval ::PackageRepository::getFileViaHttp \ 
          [list $uri] [list 20] [list stdout] [list $quiet] $options] 
1415
1416
1417
1418
1419
1420

1421
1422
1423
1424
1425
1440
1441
1442
1443
1444

1445
1446
1447
1448
1449
1450





-
+





 
    # 
    # NOTE: Attempt to verify that we are currently logged in.  If so, do 
    #       nothing; otherwise, attempt to login. 
    # 
    if {![info exists loginCookie] || [llength $loginCookie] != 2} then { 
    if {![haveValidLoginCookie]} then { 
      resetCookieAndLoginSimple 
    } 
  } 
 
  # 
1493
1494
1495
1496
1497
1498

1499
1500
1501
1502
1503
1518
1519
1520
1521
1522

1523
1524
1525
1526
1527
1528





-
+





    variable logoutUrn 
 
    # 
    # NOTE: Attempt to verify that we are currently logged in. 
    # 
    if {![info exists loginCookie] || [llength $loginCookie] != 2} then { 
    if {![haveValidLoginCookie]} then { 
      error "missing or invalid login cookie" 
    } 
 
    # 
    # NOTE: Build the full URI for the logout request, performing any