Changeset 763 in josm
- Timestamp:
- 2008-08-11T00:32:08+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmConnection.java
r662 r763 128 128 cancel = true; 129 129 if (activeConnection != null) { 130 activeConnection.setConnectTimeout(1); 131 activeConnection.setReadTimeout(1); 130 activeConnection.setConnectTimeout(100); 131 activeConnection.setReadTimeout(100); 132 try { 133 Thread.sleep(100); 134 } catch (InterruptedException ex) {} 132 135 activeConnection.disconnect(); 133 136 } … … 135 138 136 139 protected void addAuth(HttpURLConnection con) throws CharacterCodingException { 137 138 139 140 141 140 CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder(); 141 String auth = Main.pref.get("osm-server.username") + ":" + Main.pref.get("osm-server.password"); 142 ByteBuffer bytes = encoder.encode(CharBuffer.wrap(auth)); 143 con.addRequestProperty("Authorization", "Basic "+Base64.encode(bytes)); 144 } 142 145 } -
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r679 r763 55 55 * Whether the operation should be aborted as soon as possible. 56 56 */ 57 private boolean cancel = false; 58 57 // use the inherited variable 58 // private boolean cancel = false; 59 59 60 /** 60 61 * Object describing current changeset
Note:
See TracChangeset
for help on using the changeset viewer.