diff --git a/mozilla/netwerk/testserver/Connection.java b/mozilla/netwerk/testserver/Connection.java new file mode 100644 index 00000000000..c35f7813eef --- /dev/null +++ b/mozilla/netwerk/testserver/Connection.java @@ -0,0 +1,98 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +import java.io.*; +import java.net.*; + +class Connection extends Thread { + + public static final boolean DEBUG = true; + public Socket client; + protected BufferedReader in; + protected PrintWriter out; + + final static String SERVER = "HTTP Test Server/1.1"; + + public Connection(Socket client_socket) { + client = client_socket; + + if (DEBUG) + { + System.out.println( + "---------------------------------------------------------"); + System.out.println(client); + } + try { + in = new BufferedReader(new InputStreamReader( + client.getInputStream())); + out = new PrintWriter(client.getOutputStream()); + this.start(); + } + catch (IOException e) { + try { + client.close(); + } + catch (IOException another) { + } + System.out.println("Exception while getting socket streams." + + e); + } + } + + final public void run() { + + String line = null; + String firstline = null; + request = new StringBuffer(); + + int len = 0; + try { + while(true) { + line = in.readLine(); + if (line == null) + break; + if (firstline == null) + firstline = new String(line); + len = line.length(); + if (len == 0) + break; + request.append(line); + request.append("\n"); + if (DEBUG) + System.out.println(line); + } + // This will appropriately write all the stuff based + // on the first line and the script file + ScriptFile sf = new ScriptFile(this, firstline, out); + out.flush(); + // mark for garbage collect + sf = null; + } // try + catch (IOException e) { + System.out.println("Some problem while communicating. " + e); + } + finally { + try { + client.close(); + } + catch (IOException e2) { + } + } + } + StringBuffer request; +} diff --git a/mozilla/netwerk/testserver/ScriptFile.java b/mozilla/netwerk/testserver/ScriptFile.java new file mode 100644 index 00000000000..bf20c462353 --- /dev/null +++ b/mozilla/netwerk/testserver/ScriptFile.java @@ -0,0 +1,190 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +import java.io.*; +import java.util.Date; +/* + ScriptFile class reads off the script file and sets up the list + of delimiters. +*/ + +class ScriptFile { + + public static final String URLMAP = new String("docs/urlmap"); + + public ScriptFile(Connection c, String req, PrintWriter stream ) { + con = c; + request = req; + out = stream; + if (out == null) + out = new PrintWriter(System.out); + file = URLMAP; + try { + Parse(); + } + catch (IOException e) + { + out.println("HTTP/1.1 500 Server Error\n\n"); + out.println("Failed with this exception-"); + out.println(e); + } + out.flush(); + } + + public ScriptFile(String f) { + file = f; + out = new PrintWriter(System.out); + try { + Parse(); + } + catch (FileNotFoundException e) + { + out.println("HTTP/1.1 404 File Not Found\n\n"); + out.println("File not found!"); + out.println(e); + } + catch (IOException e) + { + out.println("HTTP/1.1 500 Server Error\n\n"); + out.println("Failed with this exception-"); + out.println(e); + } + out.flush(); + } + + public void Parse () throws IOException { + + if ((request == null) || (request.length() == 0) || request.startsWith("GET / ")) + { + WriteDefaultResponse(); + return; + } + + boolean outDirty = false; + if (file != null) + { + DataInputStream in = + new DataInputStream( + new BufferedInputStream( + new FileInputStream(file))); + + String s = new String(); + while((s = in.readLine())!= null) + { + s.trim(); + /* Skip comments */ + if ((s.length() == 0) || (s.charAt(0) == '#')) + continue; + if (s.startsWith("START")) { + // Check to see if this was in the requested URL + String filename = new String ("GET " + s.substring(6)); + if (request.startsWith(filename)) + { + continue; + } + else// Else skipto past the END + { + while (!s.startsWith("END")) + { + s = in.readLine(); + if (s != null) + { + s.trim(); + } + else + break; + } + } + } + else if (s.startsWith("INCLUDE")) { + outDirty = true; + WriteOutFile("docs/" + s.substring(8)); + } + else if (s.startsWith("CRLF")) { + outDirty = true; + out.println(); + } + else if (s.startsWith("END")) { + // ignore should never have appeared here though! + continue; + } + } + in.close(); + + if (outDirty) + { + out.flush(); + } + else + WriteDefaultResponse(); + } + } + + public static void main(String args[]) { + if (args.length >= 1) { + ScriptFile sf = new ScriptFile(args[0]); + /* Detect change stuff; + File f = new File(args[0]); + long lastMod = f.lastModified(); + while (f.lastModified() == lastMod) { + } + sf.Parse(); + */ + } + } + + protected void WriteOutFile(String filename) throws IOException { + DataInputStream incl = + new DataInputStream( + new BufferedInputStream( + new FileInputStream(filename))); + // This doesn't have to be line wise... change later TODO + String s; + while ((s = incl.readLine()) != null) + { + out.println(s); + } + incl.close(); + } + + protected void WriteDefaultResponse() throws IOException { + WriteOutFile("docs/generic.res"); + out.println("Date: " + (new Date()).toString()); + if (file != null) + { + File f = new File(file); + out.println("Last-modified: " + (new Date(f.lastModified())).toString()); + } + out.println("\n"); // prints 2 + if (con != null) + { + out.println("
");
+ out.println(con.request);
+ out.println("");
+ out.println("From- " + con.client);
+ }
+ }
+
+ String file = null;
+ // The string associated with this script occurence
+
+ String request;
+ PrintWriter out;
+ Connection con;
+}
diff --git a/mozilla/netwerk/testserver/TestServer.java b/mozilla/netwerk/testserver/TestServer.java
new file mode 100644
index 00000000000..15afb9f941d
--- /dev/null
+++ b/mozilla/netwerk/testserver/TestServer.java
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.0 (the "NPL"); you may not use this file except in
+ * compliance with the NPL. You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ *
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All Rights
+ * Reserved.
+ */
+
+import java.io.*;
+import java.net.*;
+
+public class TestServer extends Thread {
+
+ final static int DEFAULT_PORT = 4321;
+
+ protected int port;
+ protected ServerSocket listen_socket;
+
+ public static void fail(Exception e, String msg) {
+ System.err.println(msg + ":" + e);
+ e.printStackTrace();
+ }
+
+ public TestServer() {
+ this(DEFAULT_PORT);
+ }
+
+ public TestServer(int port) {
+ this.port = port;
+ try {
+ listen_socket = new ServerSocket(port);
+ }
+ catch (IOException e) {
+ fail(e, "Exception creating server socket");
+ }
+ System.out.println("Server: listening on port " + port);
+ this.start();
+ }
+
+ public void run() {
+ try {
+ while (true) {
+ Socket client_socket = listen_socket.accept();
+ Connection c = new Connection(client_socket);
+ }
+ }
+ catch (IOException e) {
+ fail(e, "Exception while listening");
+ }
+ }
+
+ public static void main(String args[]) {
+ int port = DEFAULT_PORT;
+ if (args.length == 1) {
+ try {
+ port = Integer.parseInt(args[0]);
+ }
+ catch (NumberFormatException e) {
+ port = DEFAULT_PORT;
+ }
+ }
+ new TestServer(port);
+ }
+
+}
+
diff --git a/mozilla/netwerk/testserver/docs/bar.html b/mozilla/netwerk/testserver/docs/bar.html
new file mode 100644
index 00000000000..3f8513ae734
--- /dev/null
+++ b/mozilla/netwerk/testserver/docs/bar.html
@@ -0,0 +1,6 @@
+
+
++ +To compile this you will need any version of JDK >1.1.2. Just compile them +with command-
javac *.java+And then run the server with command-
java TestServer [port]+The port is optional and if not specified defaults to 4321. +Assuming that the server is running on http://foo:4321/ +Use the following URLs to retrieve special responses. In order to create +your own special case- telnet to foo, and edit the docs/urlmap file to +handle special cases and then add info here about it. +
+
| http://foo:4321/help | +This help file. | +
| http://foo:4321/ | +Default echo of the server. Prints the request out. | +
| http://foo:4321/multi | +Returns a multipart message. | +
| http://foo:4321/close | +Returns "Connection: close" in a response header. | +
| http://foo:4321/both | +Returns the request as well as the response headers. | +
If you need any more help with running this server, or have suggestions +to improve it let me +know. + + diff --git a/mozilla/netwerk/testserver/docs/urlmap b/mozilla/netwerk/testserver/docs/urlmap new file mode 100644 index 00000000000..b89527b0e52 --- /dev/null +++ b/mozilla/netwerk/testserver/docs/urlmap @@ -0,0 +1,97 @@ +# +# Foo- Copy/Paste these 9 lines to generate new cases. +# +START /foo +INCLUDE generic.res +Content-Type: text/html +CRLF +INCLUDE foo.html +END + +# +# This is a simple multipart message example +# for more complicated stuff try "complex" +# +START /multi +INCLUDE generic.res +Content-Type: multipart/mixed; boundary=ComfortablyNumb +CRLF +--ComfortablyNumb +INCLUDE foo.html +CRLF +--ComfortablyNumb +INCLUDE bar.html +--ComfortablyNumb-- +END + +# +# Send the help file to see how this server is used. +# +START /help +INCLUDE generic.res +CRLF +INCLUDE help.html +END + +# +# A more complex variation of multipart messaging. +# If this works, every code contributor to Necko +# gets a treat from me personally :) -Gagan +# +START /complex +INCLUDE generic.res +Content-Type: multipart/mixed; boundary=TheWallFromPinkFloyd +CRLF +Preamble to multipart messages. Only clients that dont handle +multipart would see this! +CRLF +--TheWallFromPinkFloyd +Content-Type: text/plain +CRLF + The Thin Ice + Another Brick In The Wall-I +CRLF +--TheWallFromPinkFloyd +Content-Type: multipart/parallel; boundary=SideTwoOfTheWall +CRLF +--SideTwoOfTheWall +Content-Type: text/plain +CRLF + Young Lust + Goodbye Cruel World +CRLF +--SideTwoOfTheWall +Content-Type: text/plain +CRLF + Another Brick In The Wall-II +--SideTwoOfTheWall-- +CRLF +--TheWallFromPinkFloyd +Content-Type: text/plain +CRLF + Another Brick In The Wall-III +--TheWallFromPinkFloyd-- +CRLF +END + +# +# Pragma: no-cache test +# +START /pragma +INCLUDE generic.res +Pragma: no-cache +Content-Type: text/html +CRLF +INCLUDE foo.html +END + +# +# close: return a connection: close header +# +START /close +INCLUDE generic.res +Connection: Close +Content-Type: text/html +CRLF +INCLUDE foo.html +END diff --git a/mozilla/tools/testserver/Connection.java b/mozilla/tools/testserver/Connection.java new file mode 100644 index 00000000000..c35f7813eef --- /dev/null +++ b/mozilla/tools/testserver/Connection.java @@ -0,0 +1,98 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +import java.io.*; +import java.net.*; + +class Connection extends Thread { + + public static final boolean DEBUG = true; + public Socket client; + protected BufferedReader in; + protected PrintWriter out; + + final static String SERVER = "HTTP Test Server/1.1"; + + public Connection(Socket client_socket) { + client = client_socket; + + if (DEBUG) + { + System.out.println( + "---------------------------------------------------------"); + System.out.println(client); + } + try { + in = new BufferedReader(new InputStreamReader( + client.getInputStream())); + out = new PrintWriter(client.getOutputStream()); + this.start(); + } + catch (IOException e) { + try { + client.close(); + } + catch (IOException another) { + } + System.out.println("Exception while getting socket streams." + + e); + } + } + + final public void run() { + + String line = null; + String firstline = null; + request = new StringBuffer(); + + int len = 0; + try { + while(true) { + line = in.readLine(); + if (line == null) + break; + if (firstline == null) + firstline = new String(line); + len = line.length(); + if (len == 0) + break; + request.append(line); + request.append("\n"); + if (DEBUG) + System.out.println(line); + } + // This will appropriately write all the stuff based + // on the first line and the script file + ScriptFile sf = new ScriptFile(this, firstline, out); + out.flush(); + // mark for garbage collect + sf = null; + } // try + catch (IOException e) { + System.out.println("Some problem while communicating. " + e); + } + finally { + try { + client.close(); + } + catch (IOException e2) { + } + } + } + StringBuffer request; +} diff --git a/mozilla/tools/testserver/ScriptFile.java b/mozilla/tools/testserver/ScriptFile.java new file mode 100644 index 00000000000..bf20c462353 --- /dev/null +++ b/mozilla/tools/testserver/ScriptFile.java @@ -0,0 +1,190 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +import java.io.*; +import java.util.Date; +/* + ScriptFile class reads off the script file and sets up the list + of delimiters. +*/ + +class ScriptFile { + + public static final String URLMAP = new String("docs/urlmap"); + + public ScriptFile(Connection c, String req, PrintWriter stream ) { + con = c; + request = req; + out = stream; + if (out == null) + out = new PrintWriter(System.out); + file = URLMAP; + try { + Parse(); + } + catch (IOException e) + { + out.println("HTTP/1.1 500 Server Error\n\n"); + out.println("Failed with this exception-"); + out.println(e); + } + out.flush(); + } + + public ScriptFile(String f) { + file = f; + out = new PrintWriter(System.out); + try { + Parse(); + } + catch (FileNotFoundException e) + { + out.println("HTTP/1.1 404 File Not Found\n\n"); + out.println("File not found!"); + out.println(e); + } + catch (IOException e) + { + out.println("HTTP/1.1 500 Server Error\n\n"); + out.println("Failed with this exception-"); + out.println(e); + } + out.flush(); + } + + public void Parse () throws IOException { + + if ((request == null) || (request.length() == 0) || request.startsWith("GET / ")) + { + WriteDefaultResponse(); + return; + } + + boolean outDirty = false; + if (file != null) + { + DataInputStream in = + new DataInputStream( + new BufferedInputStream( + new FileInputStream(file))); + + String s = new String(); + while((s = in.readLine())!= null) + { + s.trim(); + /* Skip comments */ + if ((s.length() == 0) || (s.charAt(0) == '#')) + continue; + if (s.startsWith("START")) { + // Check to see if this was in the requested URL + String filename = new String ("GET " + s.substring(6)); + if (request.startsWith(filename)) + { + continue; + } + else// Else skipto past the END + { + while (!s.startsWith("END")) + { + s = in.readLine(); + if (s != null) + { + s.trim(); + } + else + break; + } + } + } + else if (s.startsWith("INCLUDE")) { + outDirty = true; + WriteOutFile("docs/" + s.substring(8)); + } + else if (s.startsWith("CRLF")) { + outDirty = true; + out.println(); + } + else if (s.startsWith("END")) { + // ignore should never have appeared here though! + continue; + } + } + in.close(); + + if (outDirty) + { + out.flush(); + } + else + WriteDefaultResponse(); + } + } + + public static void main(String args[]) { + if (args.length >= 1) { + ScriptFile sf = new ScriptFile(args[0]); + /* Detect change stuff; + File f = new File(args[0]); + long lastMod = f.lastModified(); + while (f.lastModified() == lastMod) { + } + sf.Parse(); + */ + } + } + + protected void WriteOutFile(String filename) throws IOException { + DataInputStream incl = + new DataInputStream( + new BufferedInputStream( + new FileInputStream(filename))); + // This doesn't have to be line wise... change later TODO + String s; + while ((s = incl.readLine()) != null) + { + out.println(s); + } + incl.close(); + } + + protected void WriteDefaultResponse() throws IOException { + WriteOutFile("docs/generic.res"); + out.println("Date: " + (new Date()).toString()); + if (file != null) + { + File f = new File(file); + out.println("Last-modified: " + (new Date(f.lastModified())).toString()); + } + out.println("\n"); // prints 2 + if (con != null) + { + out.println("
");
+ out.println(con.request);
+ out.println("");
+ out.println("From- " + con.client);
+ }
+ }
+
+ String file = null;
+ // The string associated with this script occurence
+
+ String request;
+ PrintWriter out;
+ Connection con;
+}
diff --git a/mozilla/tools/testserver/TestServer.java b/mozilla/tools/testserver/TestServer.java
new file mode 100644
index 00000000000..15afb9f941d
--- /dev/null
+++ b/mozilla/tools/testserver/TestServer.java
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.0 (the "NPL"); you may not use this file except in
+ * compliance with the NPL. You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ *
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All Rights
+ * Reserved.
+ */
+
+import java.io.*;
+import java.net.*;
+
+public class TestServer extends Thread {
+
+ final static int DEFAULT_PORT = 4321;
+
+ protected int port;
+ protected ServerSocket listen_socket;
+
+ public static void fail(Exception e, String msg) {
+ System.err.println(msg + ":" + e);
+ e.printStackTrace();
+ }
+
+ public TestServer() {
+ this(DEFAULT_PORT);
+ }
+
+ public TestServer(int port) {
+ this.port = port;
+ try {
+ listen_socket = new ServerSocket(port);
+ }
+ catch (IOException e) {
+ fail(e, "Exception creating server socket");
+ }
+ System.out.println("Server: listening on port " + port);
+ this.start();
+ }
+
+ public void run() {
+ try {
+ while (true) {
+ Socket client_socket = listen_socket.accept();
+ Connection c = new Connection(client_socket);
+ }
+ }
+ catch (IOException e) {
+ fail(e, "Exception while listening");
+ }
+ }
+
+ public static void main(String args[]) {
+ int port = DEFAULT_PORT;
+ if (args.length == 1) {
+ try {
+ port = Integer.parseInt(args[0]);
+ }
+ catch (NumberFormatException e) {
+ port = DEFAULT_PORT;
+ }
+ }
+ new TestServer(port);
+ }
+
+}
+
diff --git a/mozilla/tools/testserver/docs/bar.html b/mozilla/tools/testserver/docs/bar.html
new file mode 100644
index 00000000000..3f8513ae734
--- /dev/null
+++ b/mozilla/tools/testserver/docs/bar.html
@@ -0,0 +1,6 @@
+
+
++ +To compile this you will need any version of JDK >1.1.2. Just compile them +with command-
javac *.java+And then run the server with command-
java TestServer [port]+The port is optional and if not specified defaults to 4321. +Assuming that the server is running on http://foo:4321/ +Use the following URLs to retrieve special responses. In order to create +your own special case- telnet to foo, and edit the docs/urlmap file to +handle special cases and then add info here about it. +
+
| http://foo:4321/help | +This help file. | +
| http://foo:4321/ | +Default echo of the server. Prints the request out. | +
| http://foo:4321/multi | +Returns a multipart message. | +
| http://foo:4321/close | +Returns "Connection: close" in a response header. | +
| http://foo:4321/both | +Returns the request as well as the response headers. | +
If you need any more help with running this server, or have suggestions +to improve it let me +know. + + diff --git a/mozilla/tools/testserver/docs/urlmap b/mozilla/tools/testserver/docs/urlmap new file mode 100644 index 00000000000..b89527b0e52 --- /dev/null +++ b/mozilla/tools/testserver/docs/urlmap @@ -0,0 +1,97 @@ +# +# Foo- Copy/Paste these 9 lines to generate new cases. +# +START /foo +INCLUDE generic.res +Content-Type: text/html +CRLF +INCLUDE foo.html +END + +# +# This is a simple multipart message example +# for more complicated stuff try "complex" +# +START /multi +INCLUDE generic.res +Content-Type: multipart/mixed; boundary=ComfortablyNumb +CRLF +--ComfortablyNumb +INCLUDE foo.html +CRLF +--ComfortablyNumb +INCLUDE bar.html +--ComfortablyNumb-- +END + +# +# Send the help file to see how this server is used. +# +START /help +INCLUDE generic.res +CRLF +INCLUDE help.html +END + +# +# A more complex variation of multipart messaging. +# If this works, every code contributor to Necko +# gets a treat from me personally :) -Gagan +# +START /complex +INCLUDE generic.res +Content-Type: multipart/mixed; boundary=TheWallFromPinkFloyd +CRLF +Preamble to multipart messages. Only clients that dont handle +multipart would see this! +CRLF +--TheWallFromPinkFloyd +Content-Type: text/plain +CRLF + The Thin Ice + Another Brick In The Wall-I +CRLF +--TheWallFromPinkFloyd +Content-Type: multipart/parallel; boundary=SideTwoOfTheWall +CRLF +--SideTwoOfTheWall +Content-Type: text/plain +CRLF + Young Lust + Goodbye Cruel World +CRLF +--SideTwoOfTheWall +Content-Type: text/plain +CRLF + Another Brick In The Wall-II +--SideTwoOfTheWall-- +CRLF +--TheWallFromPinkFloyd +Content-Type: text/plain +CRLF + Another Brick In The Wall-III +--TheWallFromPinkFloyd-- +CRLF +END + +# +# Pragma: no-cache test +# +START /pragma +INCLUDE generic.res +Pragma: no-cache +Content-Type: text/html +CRLF +INCLUDE foo.html +END + +# +# close: return a connection: close header +# +START /close +INCLUDE generic.res +Connection: Close +Content-Type: text/html +CRLF +INCLUDE foo.html +END