Ignore:
Timestamp:
2009-04-06T20:18:48+02:00 (15 years ago)
Author:
framm
Message:
  • Major redesign of how JOSM talks to the OSM server. Connections now all go through a new OsmApi class that finds out which version the server uses. JOSM should now be able to handle 0.5 and 0.6 without configuration change. Config options osm-server.version and osm-server.additional-versions now obsolete. Handling of error and cancel situations might still need some improvement.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/MyHttpHandler.java

    r1169 r1523  
    99// Basically a copy of sun.net.www.protocol.http.Handler
    1010public class MyHttpHandler extends sun.net.www.protocol.http.Handler  {
    11             protected String proxy;
    12             protected int proxyPort;
     11    protected String proxy;
     12    protected int proxyPort;
    1313
    14             public MyHttpHandler() {
    15                 super();
    16                 proxy = null;
    17                 proxyPort = -1;
    18             }
     14    public MyHttpHandler() {
     15        super();
     16        proxy = null;
     17        proxyPort = -1;
     18    }
    1919
    20             protected java.net.URLConnection openConnection(URL u)
    21                     throws IOException {
    22                 return openConnection(u, (Proxy) null);
    23             }
    24             public MyHttpHandler(String proxy, int port) {
    25                 this.proxy = proxy;
    26                 proxyPort = port;
    27             }
     20    protected java.net.URLConnection openConnection(URL u)
     21    throws IOException {
     22        return openConnection(u, (Proxy) null);
     23    }
     24    public MyHttpHandler(String proxy, int port) {
     25        this.proxy = proxy;
     26        proxyPort = port;
     27    }
    2828
    29             protected java.net.URLConnection openConnection(URL u, Proxy p)
    30                     throws IOException {
    31                 return new MyHttpURLConnection(u, p, this);
    32             }
     29    protected java.net.URLConnection openConnection(URL u, Proxy p)
     30    throws IOException {
     31        return new MyHttpURLConnection(u, p, this);
     32    }
    3333}
Note: See TracChangeset for help on using the changeset viewer.