summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-09-25 12:33:51 +0300
committerLars Wirzenius <liw@liw.fi>2017-09-25 12:33:51 +0300
commit8be2c5675e8fa4ea6be8b46ea75dbb6a49800502 (patch)
tree8b3ef0d7553bfee1fdbc5ab34ea8ad65bc9bfd52
parent0141bc4dc5924babf3ff22d784602b6862503808 (diff)
parent42f63e5791562021fe0da38445523fd503630444 (diff)
downloadapifw-8be2c5675e8fa4ea6be8b46ea75dbb6a49800502.tar.gz
Merge branch 'master' of ssh://git.liw.fi/apifw
-rw-r--r--NEWS3
-rw-r--r--apifw/bottleapp.py1
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 33ee800..39dcdad 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ This file summarizes changes between releases of `apifw`.
Version 0.10+git, not yet released
----------------------------------
+* Callbacks now get an extra keyword argument `raw_uri_path` so they
+ can, if they need to, process it before URL decoding happens. Qvarn
+ needs this for searches.
Version 0.10, released 2017-09-06
---------------------------------
diff --git a/apifw/bottleapp.py b/apifw/bottleapp.py
index 76602c6..0d61e09 100644
--- a/apifw/bottleapp.py
+++ b/apifw/bottleapp.py
@@ -237,6 +237,7 @@ class BottleApplication:
def _callback_with_body(self, callback):
def wrapper(*args, **kwargs):
+ kwargs['raw_uri_path'] = bottle.request.environ['RAW_URI']
content_type, body = self._get_request_body()
response = callback(content_type, body, *args, **kwargs)
return bottle.HTTPResponse(