Merge branch 'develop' of personal.github.com:BBVA/kapow into develop
This commit is contained in:
@@ -72,6 +72,8 @@ class Connection:
|
|||||||
return self.request.content
|
return self.request.content
|
||||||
elif res.path == 'request/path':
|
elif res.path == 'request/path':
|
||||||
return self.request.path.encode('utf-8')
|
return self.request.path.encode('utf-8')
|
||||||
|
elif res.path == 'request/host':
|
||||||
|
return self.request.host.encode('utf-8')
|
||||||
elif res.path.startswith('request/matches/'):
|
elif res.path.startswith('request/matches/'):
|
||||||
return self.request.match_info[nth(2)].encode('utf-8')
|
return self.request.match_info[nth(2)].encode('utf-8')
|
||||||
elif res.path.startswith('request/params/'):
|
elif res.path.startswith('request/params/'):
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ else
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
response /status 200
|
response /status 200
|
||||||
response /header/Content-Type "$(python -m mimetypes "$BASE/$REAL" | awk '/type:/ {print $2; exit 0}; !/type:/ {print "application/octet-stream"}')"
|
response /headers/Content-Type "$(python -m mimetypes "$BASE/$REAL" | awk '/type:/ {print $2; exit 0}; !/type:/ {print "application/octet-stream"}')"
|
||||||
response /body < "$BASE/$REAL"
|
response /body < "$BASE/$REAL"
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ following resource paths:
|
|||||||
│
|
│
|
||||||
├─ request All information related to the HTTP request. Read-Only
|
├─ request All information related to the HTTP request. Read-Only
|
||||||
│ ├──── method Used HTTP Method (GET, POST)
|
│ ├──── method Used HTTP Method (GET, POST)
|
||||||
|
│ ├──── host Host part of the URL
|
||||||
│ ├──── path Complete URL path (URL-unquoted)
|
│ ├──── path Complete URL path (URL-unquoted)
|
||||||
│ ├──── matches Previously matched URL path parts
|
│ ├──── matches Previously matched URL path parts
|
||||||
│ │ └──── <name>
|
│ │ └──── <name>
|
||||||
|
|||||||
Reference in New Issue
Block a user