Skip to content

Commit dc9c4b3

Browse files
author
Sergio García Prado
authored
Merge pull request #64 from Clariteia/0.1.2
0.1.2
2 parents c88fce9 + e387f37 commit dc9c4b3

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@
2828

2929
* Enforce Authentication Service validation if enabled.
3030
* Improve error messages and use more appropriate status codes.
31+
32+
## 0.1.2 (2021-11-04)
33+
34+
* Fix bug related with byte-encoded requests forwarding.

minos/api_gateway/rest/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.1.1"
1+
__version__ = "0.1.2"
22

33
from .config import (
44
ApiGatewayConfig,

minos/api_gateway/rest/handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ async def call(address: str, port: int, original_req: web.Request, user: Optiona
106106

107107
url = original_req.url.with_scheme("http").with_host(address).with_port(port)
108108
method = original_req.method
109-
content = await original_req.text()
109+
data = await original_req.read()
110110

111111
logger.info(f"Redirecting {method!r} request to {url!r}...")
112112

113113
try:
114114
async with ClientSession() as session:
115-
async with session.request(headers=headers, method=method, url=url, data=content) as response:
115+
async with session.request(headers=headers, method=method, url=url, data=data) as response:
116116
return await _clone_response(response)
117117
except ClientConnectorError:
118118
raise web.HTTPServiceUnavailable(text="The requested endpoint is not available.")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "minos_apigateway"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "Python Package containing the main API Gateway implementation used in Minos Microservices."
55
readme = "README.md"
66
repository = "https://github.com/clariteia/api_gateway"

0 commit comments

Comments
 (0)