Ticket #1810: 20081201uploadissuesjosm.diff
File 20081201uploadissuesjosm.diff, 2.4 KB (added by , 16 years ago) |
---|
-
src/org/openstreetmap/josm/io/OsmServerWriter.java
222 222 activeConnection.disconnect(); 223 223 if (retCode == 404) 224 224 { 225 System.out.println("Server does not support changesets, continuing");225 System.out.println("Server does not support changesets, or the changeset was not found, continuing"); 226 226 return true; 227 227 } 228 228 if (retCode != 200 && retCode != 412) { … … 238 238 // Look for a detailed error message from the server 239 239 if (activeConnection.getHeaderField("Error") != null) 240 240 retMsg += "\n" + activeConnection.getHeaderField("Error"); 241 // No error header is actually returned, look at the std payload 241 242 242 243 // Report our error 243 244 ByteArrayOutputStream o = new ByteArrayOutputStream(); … … 345 346 // Look for a detailed error message from the server 346 347 if (activeConnection.getHeaderField("Error") != null) 347 348 retMsg += "\n" + activeConnection.getHeaderField("Error"); 349 // No error header is actually returned, look at the std payload 348 350 349 351 // Report our error 350 352 ByteArrayOutputStream o = new ByteArrayOutputStream(); … … 416 418 int retCode = activeConnection.getResponseCode(); 417 419 if (retCode == 200) 418 420 changeset.id = readId(activeConnection.getInputStream()); 421 // wtf we already have the id of the changeset, which isn't returned by the api when we are closing the changeset 419 422 System.out.println("got return: "+retCode+" with id "+changeset.id); 420 423 String retMsg = activeConnection.getResponseMessage(); 421 424 activeConnection.disconnect(); 422 425 if (retCode == 404) 423 426 { 424 System.out.println("Server does not support changesets, continuing");427 System.out.println("Server does not support changesets, or the changeset could not be found, continuing"); 425 428 return; 426 429 } 427 430 if (retCode != 200 && retCode != 412) { … … 435 438 // Look for a detailed error message from the server 436 439 if (activeConnection.getHeaderField("Error") != null) 437 440 retMsg += "\n" + activeConnection.getHeaderField("Error"); 441 // No error header is actually returned, look at the std payload 438 442 439 443 // Report our error 440 444 ByteArrayOutputStream o = new ByteArrayOutputStream();