blob: 92d29550c4d8c01d5bec40f3fe8b88008601f954 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package uk.org.ury.server;
import java.util.ArrayList;
import java.util.List;
/**
* The BAPS server protocol (a minimal implementation of HTTP 1.1) handler.
*
* @author Matt Windsor
*
*/
public class ServerProtocol
{
public static final String GET_HEADER = "HTTP/1.1 200 OK\n";
public List<String> buffer;
public
ServerProtocol ()
{
buffer = new ArrayList<String> ();
}
public String
processInput (String string)
{
if (string.equals (""))
{
System.out.println ("Bingo!");
return "HTTP/1.1 200 OK\nConnection: Close\n\r\n<html><head></head><body>poo</body></html>\n\r\n";
}
return "";
}
}
|