/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/web/BanListener.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/web/BanListener.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1938 by torben, Wed Mar 20 15:10:54 2013 UTC revision 2428 by torben, Mon Mar 9 11:56:37 2015 UTC
# Line 41  public class BanListener implements Http Line 41  public class BanListener implements Http
41                    
42          @Override          @Override
43          public void handle(HttpExchange http) throws IOException {                        public void handle(HttpExchange http) throws IOException {              
         /*              if(!event.path[0].equalsIgnoreCase("webstatus")) {  
                         return;  
                 }*/  
44    
45                  String text;                  String text;
46    
# Line 59  public class BanListener implements Http Line 56  public class BanListener implements Http
56                  }                  }
57    
58                  byte bytes[] = text.getBytes();                  byte bytes[] = text.getBytes();
59                    http.getResponseHeaders().add("Content-Type", "text/plain");
60                  http.sendResponseHeaders(HttpURLConnection.HTTP_OK, bytes.length );                  http.sendResponseHeaders(HttpURLConnection.HTTP_OK, bytes.length );
61                  final OutputStream os = http.getResponseBody();                  final OutputStream os = http.getResponseBody();
62                  os.write(bytes);                  os.write(bytes);
63                  os.close();                  os.close();
64                    http.close();
65                                    
66          }          }
67                    

Legend:
Removed from v.1938  
changed lines
  Added in v.2428

  ViewVC Help
Powered by ViewVC 1.1.20