Changeset 2826 in josm


Ignore:
Timestamp:
2010-01-12T09:21:53+01:00 (12 years ago)
Author:
Gubaer
Message:

fixed #2851: Proxy caching problem

Location:
trunk/src/org/openstreetmap/josm/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java

    r2817 r2826  
    8080        }
    8181    }
    82 
    83 
    8482
    8583    @Override protected void finish() {}
     
    112110            synchronized(this) {
    113111                downloadConnection = (HttpURLConnection)url.openConnection();
     112                downloadConnection.setRequestProperty("Cache-Control", "no-cache");
     113                downloadConnection.setRequestProperty("User-Agent",Version.getInstance().getAgentString());
     114                downloadConnection.setRequestProperty("Host", url.getHost());
    114115                downloadConnection.connect();
    115116            }
  • trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java

    r2817 r2826  
    2222
    2323import org.openstreetmap.josm.Main;
     24import org.openstreetmap.josm.data.Version;
    2425import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    2526import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    114115            synchronized(this) {
    115116                connection = (HttpURLConnection)url.openConnection();
     117                connection.setRequestProperty("Cache-Control", "no-cache");
     118                connection.setRequestProperty("User-Agent",Version.getInstance().getAgentString());
     119                connection.setRequestProperty("Host", url.getHost());
    116120            }
    117121            in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
Note: See TracChangeset for help on using the changeset viewer.