Changeset 31486 in osm for applications/editors
- Timestamp:
- 2015-08-12T12:39:05+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthPortListener.java
r31445 r31486 19 19 */ 20 20 public class OAuthPortListener extends Thread { 21 22 protected static String RESPONSE = "<html><head><title>Mapillary login</title></head><body>Login successful, return to JOSM.</body></html>"; 21 23 22 24 @Override … … 58 60 + accessToken); 59 61 // Saves the access token in preferences. 60 Main.pref.put("mapillary.access-token", accessToken); 61 62 Main.info("The username is: " + MapillaryUser.getUsername()); 62 if (Main.main != null) { 63 Main.pref.put("mapillary.access-token", accessToken); 64 Main.info("The username is: " + MapillaryUser.getUsername()); 65 } 63 66 64 67 } catch (BindException e) { … … 70 73 71 74 private static void writeContent(PrintWriter out) { 72 String response = "<html><head><title>Mapillary login</title></head><body>Login successful, return to JOSM.</body></html>";73 75 out.println("HTTP/1.1 200 OK"); 74 out.println("Content-Length: " + response.length());76 out.println("Content-Length: " + RESPONSE.length()); 75 77 out.println("Content-Type: text/html" + "\r\n\r\n"); 76 out.println( response);78 out.println(RESPONSE); 77 79 } 78 80 }
Note:
See TracChangeset
for help on using the changeset viewer.