aboutsummaryrefslogtreecommitdiff
path: root/web/module
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-08-14 13:03:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-08-23 13:53:50 +0200
commitbcd246076540a8353fa55fc0a5e19343c1a2dbc9 (patch)
tree9fe2c24ca33b3d670267a5cbc8c8c756589f359b /web/module
parent24903813d11813f8ff9ac906d23b21e6c33b981d (diff)
Implement package search service mockup
Diffstat (limited to 'web/module')
-rw-r--r--web/module12
1 files changed, 12 insertions, 0 deletions
diff --git a/web/module b/web/module
index e1cccf0..7398d45 100644
--- a/web/module
+++ b/web/module
@@ -13,6 +13,8 @@
#include <utility> // move()
#include <stdexcept> // runtime_error
+#include <butl/path>
+
namespace web
{
// HTTP status code.
@@ -68,10 +70,20 @@ namespace web
};
using name_values = std::vector<name_value>;
+ using path = butl::path;
class request
{
public:
+ using path_type = web::path;
+
+ // Corresponds to abs_path portion of HTTP URL as described in
+ // "3.2.2 HTTP URL" of http://tools.ietf.org/html/rfc2616.
+ // Returns '/' if no abs_path is present in URL.
+ //
+ virtual const path_type&
+ path () = 0;
+
//@@ Why not pass parameters directly? Lazy parsing?
//@@ Why not have something like operator[] for lookup? Probably
// in name_values.