Changeset 393d813
- Timestamp:
- May 27, 2011 9:41:49 PM (10 years ago)
- Branches:
- master
- Children:
- e0dd52a4
- Parents:
- 0000e4f
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
core/java/src/net/i2p/util/EepGet.java
r0000e4f r393d813 475 475 !_keepFetching) 476 476 break; 477 _redirects = 0; 477 478 try { 478 479 long delay = _context.random().nextInt(60*1000); … … 513 514 if (_redirectLocation != null) { 514 515 //try { 515 URL oldURL = new URL(_actualURL);516 String query = oldURL.getQuery();517 if (query == null) query = "";518 516 if (_redirectLocation.startsWith("http://")) { 519 if ( (_redirectLocation.indexOf('?') < 0) && (query.length() > 0) ) 520 _actualURL = _redirectLocation + "?" + query; 521 else 522 _actualURL = _redirectLocation; 517 _actualURL = _redirectLocation; 523 518 } else { 519 // the Location: field has been required to be an absolute URI at least since 520 // RFC 1945 (HTTP/1.0 1996), so it isn't clear what the point of this is. 521 // This oddly adds a ":" even if no port, but that seems to work. 524 522 URL url = new URL(_actualURL); 525 523 if (_redirectLocation.startsWith("/")) 526 524 _actualURL = "http://" + url.getHost() + ":" + url.getPort() + _redirectLocation; 527 525 else 526 // this blows up completely on a redirect to https://, for example 528 527 _actualURL = "http://" + url.getHost() + ":" + url.getPort() + "/" + _redirectLocation; 529 if ( (_actualURL.indexOf('?') < 0) && (query.length() > 0) )530 _actualURL = _actualURL + "?" + query;531 528 } 532 529 // an MUE is an IOE -
core/java/src/net/i2p/util/EepHead.java
r0000e4f r393d813 122 122 if (_redirectLocation != null) { 123 123 //try { 124 URL oldURL = new URL(_actualURL);125 String query = oldURL.getQuery();126 if (query == null) query = "";127 124 if (_redirectLocation.startsWith("http://")) { 128 if ( (_redirectLocation.indexOf('?') < 0) && (query.length() > 0) ) 129 _actualURL = _redirectLocation + "?" + query; 130 else 131 _actualURL = _redirectLocation; 125 _actualURL = _redirectLocation; 132 126 } else { 127 // the Location: field has been required to be an absolute URI at least since 128 // RFC 1945 (HTTP/1.0 1996), so it isn't clear what the point of this is. 129 // This oddly adds a ":" even if no port, but that seems to work. 133 130 URL url = new URL(_actualURL); 134 131 if (_redirectLocation.startsWith("/")) 135 132 _actualURL = "http://" + url.getHost() + ":" + url.getPort() + _redirectLocation; 136 133 else 134 // this blows up completely on a redirect to https://, for example 137 135 _actualURL = "http://" + url.getHost() + ":" + url.getPort() + "/" + _redirectLocation; 138 if ( (_actualURL.indexOf('?') < 0) && (query.length() > 0) )139 _actualURL = _actualURL + "?" + query;140 136 } 141 137 // an MUE is an IOE -
history.txt
r0000e4f r393d813 3 3 change on /configupdate when install dir is read-only. 4 4 (ticket #466) 5 * EepGet: 6 - Fix redirect loop (thx kytv) 7 - Reset redirect counter when retrying 5 8 * JBigI: 6 9 - Refactor to handle 64 bit libs and a list of fallback libs -
router/java/src/net/i2p/router/RouterVersion.java
r0000e4f r393d813 19 19 public final static String ID = "Monotone"; 20 20 public final static String VERSION = CoreVersion.VERSION; 21 public final static long BUILD = 9;21 public final static long BUILD = 10; 22 22 23 23 /** for example "-test" */
Note: See TracChangeset
for help on using the changeset viewer.