aboutsummaryrefslogtreecommitdiff
path: root/t/front.t
diff options
context:
space:
mode:
Diffstat (limited to 't/front.t')
-rw-r--r--t/front.t34
1 files changed, 19 insertions, 15 deletions
diff --git a/t/front.t b/t/front.t
index 0a372a6..a9badb0 100644
--- a/t/front.t
+++ b/t/front.t
@@ -1,16 +1,20 @@
<h1><%= site.name %></h1>
-<% printf("Hello world!"); %>
-<br>
-Request method: <%= getenv("REQUEST_METHOD") %>
-<br>
-<%
- char *a, *b, *bv;
- a = nextparam(512);
- printf("%s (%d)<br>", a, TRUNCATED(a));
- b = nextparam(512);
- printf("%s (%d)<br>", b, TRUNCATED(b));
- bv = split(b);
- printf("'%s' contains '%s'<br>", b, bv);
- printf("Next: %s\n", nextparam(512));
- printf("Next: %s\n", nextparam(512));
-%> \ No newline at end of file
+<p>Thanks for the <%= getenv("REQUEST_METHOD") %> request!</p>
+<table border="1">
+ <tr style="font-weight: bold;">
+ <td style="width: 60px;">Key</td>
+ <td style="width: 140px;">Value</td>
+ </tr>
+ <%
+ char *p, *v;
+ while(p = nextparam(GET, 512)){
+ v = split(p);
+ %>
+ <tr>
+ <td><%= p %></td>
+ <td><%= v %></td>
+ </tr>
+ <%
+ }
+ %>
+</table> \ No newline at end of file