Commit 9585a87f authored by Francois Serman's avatar Francois Serman
Browse files

final version

parent 2afa5b2e
......@@ -55,10 +55,17 @@ public class TestUrl
public void handle(HttpExchange t) throws IOException {
Headers h = t.getResponseHeaders();
h.add("Server", "Et ta mère elle te demande la version?");
String response = "<html><body>\nGive me an URL: " + TestUrl.form + "\n</body></html>\n";
StringBuilder response = new StringBuilder();
response.append("<html><body>");
response.append("<h1>Give the proper URL</h1>");
response.append("<p>The answer is at " + TestUrl.referenceURL + " but is not " + TestUrl.referenceURL + "...</p>");
response.append("<p>Need to set URL parameter " + TestUrl.form + "</p>");
response.append("</body></html>");
t.sendResponseHeaders(200, response.length());
OutputStream os = t.getResponseBody();
os.write(response.getBytes());
os.write(response.toString().getBytes());
os.close();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment