- Timestamp:
- 2017-07-24T21:47:37+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java
r31820 r31821 612 612 boolean noMoreRedirects = false; 613 613 614 //System.err.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");615 614 HttpURLConnection connection = null; 616 615 if(url_str.startsWith("http:") || url_str.startsWith("https:")) { // only test http urls … … 630 629 // HTTP Codes 3xx are redirects, http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html 631 630 int responseCode = connection.getResponseCode(); 632 //System.err.println("@@@ response code was " + responseCode);633 631 if(responseCode >= 300 && responseCode < 400) { 634 632 //String responseMsg = connection.getResponseMessage(); 635 //System.err.println("@@@ response msg: " + responseMsg);636 633 637 634 // Get the Location header since this specifies the new location of the resource 638 635 String location = connection.getHeaderField("Location"); 639 636 640 //System.err.println("@@@ Old URL: |" + url_str + "|");641 //System.err.println("@@@ LOCATION: |" + location + "|");642 637 // this becomes the url that wget should download from 643 638 url_str = location.trim(); … … 656 651 657 652 if(noMoreRedirects) { 658 //System.err.println("@@@ Found url_str " + url_str);659 //System.err.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");660 653 return url_str; 661 654 }
Note:
See TracChangeset
for help on using the changeset viewer.