diff --git a/ssget/files/ss_index.mat b/ssget/files/ss_index.mat index 0dea5e49ba..70545733fe 100644 Binary files a/ssget/files/ss_index.mat and b/ssget/files/ss_index.mat differ diff --git a/ssget/files/ssstats.csv b/ssget/files/ssstats.csv index f44e1f976a..13819b097e 100644 --- a/ssget/files/ssstats.csv +++ b/ssget/files/ssstats.csv @@ -1,5 +1,5 @@ -2851 -16-Jan-2019 14:21:19 +2856 +09-Oct-2019 16:31:17 HB,1138_bus,1138,1138,4054,1,0,0,1,1,1,power network problem,4054 HB,494_bus,494,494,1666,1,0,0,1,1,1,power network problem,1666 HB,662_bus,662,662,2474,1,0,0,1,1,1,power network problem,2474 @@ -2851,3 +2851,8 @@ Freescale,nxp1,414604,414604,2655880,1,0,0,0,0.9998398784682034,0.82205799966457 Martin,marine1,400320,400320,6226538,1,0,0,0,0.922267240944297,0,chemical oceanography problem,6226538 Negre,dendrimer,730,730,63024,1,0,0,0,1,1,computational chemistry problem,63024 Precima,analytics,303813,303813,2006126,1,0,0,0,1,1,data analytics problem,2006126 +GAP,GAP-twitter,61578415,61578415,1468364884,1,0,0,0,0.3621059600332965,0.001422518355458029,directed weighted graph,1468364884 +GAP,GAP-web,50636151,50636151,1930292948,1,0,0,0,0.1245713694644861,0.0004892386935249789,directed weighted graph,1930292948 +GAP,GAP-road,23947347,23947347,57708624,1,0,0,0,1,1,directed weighted graph,57708624 +GAP,GAP-kron,134217726,134217726,4223264644,1,0,0,0,1,1,random undirected weighted graph,4223264644 +GAP,GAP-urand,134217728,134217728,4294966740,1,0,0,0,1,1,random undirected weighted graph,4294966740 diff --git a/ssget/ssgui.jar b/ssget/ssgui.jar index 704efc6637..c2dc165506 100644 Binary files a/ssget/ssgui.jar and b/ssget/ssgui.jar differ diff --git a/ssget/ssgui.java b/ssget/ssgui.java index cc1f51cc30..a0ff4a08eb 100644 --- a/ssget/ssgui.java +++ b/ssget/ssgui.java @@ -2261,8 +2261,28 @@ private void download_file (String filename) try { + // Follow redirects manually + int max_redirects = 5; + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + + for(int redirect_count = 0; redirect_count < max_redirects; redirect_count++) + { + int status = conn.getResponseCode(); + if (status >= 300 && status <= 308) + { + // Redirecting + String loc = conn.getHeaderField("Location"); + url = new URL(loc); + conn = (HttpURLConnection) url.openConnection(); + } + else + { + break; + } + } + // determine the file size (fails for files > 2GB) - int len = url.openConnection ( ).getContentLength ( ) ; + int len = conn.getContentLength(); // start the progress bar if (gui_ready) @@ -2291,7 +2311,8 @@ private void download_file (String filename) } // open the source and destination files - url_in = new BufferedInputStream (url.openStream ( )) ; + //url_in = new BufferedInputStream (url.openStream ( )) ; + url_in = new BufferedInputStream (conn.getInputStream()) ; ftemp_out = new BufferedOutputStream (new FileOutputStream (fix_name (ftemp_name)), buffersize) ; @@ -2318,9 +2339,10 @@ private void download_file (String filename) } catch (Exception e) { - // display warning dialog - JOptionPane.showMessageDialog (this, "Download failed: " - + urlstring, "Warning", JOptionPane.WARNING_MESSAGE) ; + if (debug) + { + System.out.println("Download failed: " + urlstring); + } ok = false ; }