commit 929f4b0032b7f6ecab5681191055968589a052b1
parent 425ff88201b0e81dea5246cc4b0a83c01944e08c
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sat, 1 Nov 2014 18:30:08 -0600
search: use get queries instead of post
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/html/wrapper.html b/html/wrapper.html
@@ -8,7 +8,7 @@
</head>
<body>
<a id="title" href='/'><em>Price</em><b>Chart</b></a>
- <form method="post" action="/search.html">
+ <form method="get" action="/search.html">
<fieldset>
<input type="text" name="q" />
<input type="submit" value="Search">
diff --git a/search.pl b/search.pl
@@ -38,8 +38,7 @@ while ($request->Accept() >= 0) {
# print "$_: $ENV{$_} <br>\n";
# }
- read(STDIN, my $input, $ENV{CONTENT_LENGTH});
- (undef, $input) = split("=", $input);
+ my (undef, $input) = split("=", $ENV{QUERY_STRING});
$search_sth->execute("%$input%", "%$input%");
my $products = $search_sth->fetchall_arrayref();