diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-09-25 09:32:35 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-09-25 09:32:35 +0000 |
commit | 42f63e5791562021fe0da38445523fd503630444 (patch) | |
tree | 4a0224635817399da6775e68ff64fd91865e9648 | |
parent | 17431040c1ad62dd7347cb35510af5b21f43af9e (diff) | |
download | apifw-42f63e5791562021fe0da38445523fd503630444.tar.gz |
Add: give callbacks raw_uri_path keyword argument
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | apifw/bottleapp.py | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -7,6 +7,9 @@ This file summarizes changes between releases of `apifw`. Version 0.9+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.9, released 2017-08-19 --------------------------------- 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( |