Changeset 09d1eb1


Ignore:
Timestamp:
Oct 6, 2010 1:11:21 AM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e2b7f93d
Parents:
895c9a33
Message:

reset eepget length variable after a redirect

Location:
core/java/src/net/i2p/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/EepGet.java

    r895c9a33 r09d1eb1  
    538538                throw new IOException("Too many redirects: to " + _redirectLocation);
    539539            if (_log.shouldLog(Log.INFO)) _log.info("Redirecting to " + _redirectLocation);
     540
     541            // reset some important variables, we don't want to save the values from the redirect
     542            _bytesRemaining = -1;
     543            _redirectLocation = null;
     544            _etag = null;
     545            _lastModified = null;
     546            _contentType = null;
     547            _encodingChunked = false;
     548
    540549            sendRequest(timeout);
    541550            doFetch(timeout);
  • core/java/src/net/i2p/util/EepHead.java

    r895c9a33 r09d1eb1  
    117117            timeout.setInactivityTimeout(60*1000);
    118118       
     119        // Should we even follow redirects for HEAD?
    119120        if (_redirectLocation != null) {
    120121            //try {
     
    144145                throw new IOException("Too many redirects: to " + _redirectLocation);
    145146            if (_log.shouldLog(Log.INFO)) _log.info("Redirecting to " + _redirectLocation);
     147
     148            // reset some important variables, we don't want to save the values from the redirect
     149            _bytesRemaining = -1;
     150            _redirectLocation = null;
     151            _etag = null;
     152            _lastModified = null;
     153            _contentType = null;
     154            _encodingChunked = false;
     155
    146156            sendRequest(timeout);
    147157            doFetch(timeout);
Note: See TracChangeset for help on using the changeset viewer.