Changeset 9255 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2016-01-02T11:39:21+01:00 (9 years ago)
Author:
simon04
Message:

Add functional tests for HttpClient and fix 2 bug found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/HttpClient.java

    r9249 r9255  
    7878        connection.setConnectTimeout(connectTimeout);
    7979        connection.setReadTimeout(readTimeout);
    80         connection.setInstanceFollowRedirects(maxRedirects > 0);
     80        connection.setInstanceFollowRedirects(false); // we do that ourselves
    8181        if (ifModifiedSince > 0) {
    8282            connection.setIfModifiedSince(ifModifiedSince);
     
    136136                    throw new IOException(msg);
    137137                } else if (maxRedirects > 0) {
    138                     url = new URL(redirectLocation);
     138                    url = new URL(url, redirectLocation);
    139139                    maxRedirects--;
    140140                    Main.info(tr("Download redirected to ''{0}''", redirectLocation));
Note: See TracChangeset for help on using the changeset viewer.