Changeset 11952 in josm
- Timestamp:
- 2017-04-18T17:43:03+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r11567 r11952 225 225 String help = "No command specified! The following commands are available:<ul>" + usage 226 226 + "</ul>" + "See <a href=\""+websiteDoc+"\">"+websiteDoc+"</a> for complete documentation."; 227 sendBadRequest(out, help); 227 sendHeader(out, "400 Bad Request", "text/html", true); 228 out.write(String.format( 229 RESPONSE_TEMPLATE, 230 "<title>Bad Request</title>", 231 "<h1>HTTP Error 400: Bad Request</h1>" + 232 "<p>" + help + "</p>")); 233 out.flush(); 228 234 } else { 229 235 // create handler object … … 330 336 * Sends a 400 error: bad request 331 337 * 332 * @param out 333 * The writer where the error is written 334 * @param help 335 * Optional HTML help content to display, can be null 336 * @throws IOException 337 * If the error can not be written 338 * @param out The writer where the error is written 339 * @param help Optional help content to display, can be null 340 * @throws IOException If the error can not be written 338 341 */ 339 342 private static void sendBadRequest(Writer out, String help) throws IOException {
Note:
See TracChangeset
for help on using the changeset viewer.