/[projects]/miscJava/WebserverTest/src/dk/thoerup/test/WebserverTest.java
ViewVC logotype

Diff of /miscJava/WebserverTest/src/dk/thoerup/test/WebserverTest.java

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

revision 1950 by torben, Fri Mar 22 13:57:52 2013 UTC revision 1951 by torben, Sat Mar 23 13:58:17 2013 UTC
# Line 3  package dk.thoerup.test; Line 3  package dk.thoerup.test;
3  import java.io.IOException;  import java.io.IOException;
4  import java.net.HttpURLConnection;  import java.net.HttpURLConnection;
5  import java.net.InetSocketAddress;  import java.net.InetSocketAddress;
6    import java.net.URI;
7    
8  import com.sun.net.httpserver.HttpExchange;  import com.sun.net.httpserver.HttpExchange;
9  import com.sun.net.httpserver.HttpHandler;  import com.sun.net.httpserver.HttpHandler;
# Line 22  public class WebserverTest { Line 23  public class WebserverTest {
23                                                    
24                          sb.append("Protocol: ").append( http.getProtocol() ).append("\n");                          sb.append("Protocol: ").append( http.getProtocol() ).append("\n");
25                          sb.append("Method: ").append(http.getRequestMethod() ).append("\n");                          sb.append("Method: ").append(http.getRequestMethod() ).append("\n");
26                          sb.append("URI: ").append( http.getRequestURI().toString() ).append("\n");                          
27                            URI uri = http.getRequestURI();
28                            sb.append("URI: ").append( uri.toString() ).append("\n");
29                            sb.append("URI path: ").append( uri.getPath() ).append("\n");
30                            sb.append("URI query: ").append( uri.getQuery() ).append("\n");
31                            
32                                                                                                    
33                                                    
34                          byte bytes[] = sb.toString().getBytes();                                                  byte bytes[] = sb.toString().getBytes();                        

Legend:
Removed from v.1950  
changed lines
  Added in v.1951

  ViewVC Help
Powered by ViewVC 1.1.20