afgutils 1.3.1__tar.gz → 1.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: afgutils
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Shared support functions
5
5
  Author: Araz Heydarov
6
6
  Author-email: araz.heydarov@asiafinancegroup.com
@@ -18,10 +18,11 @@ class FieldStorage:
18
18
  def __init__(self):
19
19
  self._fields: dict[str, FieldStorage.Field] = {}
20
20
  request_method: str = os.getenv("REQUEST_METHOD")
21
- if request_method == "POST":
22
- self.body_data: str = sys.stdin.read()
23
- else:
24
- self.body_data=""
21
+ self.body_data: str = sys.stdin.read()
22
+ # if request_method == "POST":
23
+ # self.body_data: str = sys.stdin.read()
24
+ # else:
25
+ # self.body_data=""
25
26
  self._query_string_parsed: dict[str, FieldStorage.Field] = {}
26
27
  self._body_data_parsed: dict[str, Any] = {}
27
28
  self._populate_fields()
@@ -50,6 +51,9 @@ class FieldStorage:
50
51
  elif content_type == "application/json":
51
52
  self._body_data_parsed: dict[str, Any] = json.loads(self.body_data)
52
53
  self._fields.update({key: self.Field(value=value) for key, value in self._body_data_parsed.items()})
54
+ if type(x_cgi_headers:=self._body_data_parsed.get("X_CGI_HEADERS")) is dict:
55
+ for k, v in x_cgi_headers.items():
56
+ if not k.startswith("X_"): os.environ[k]=v
53
57
  elif content_type == "application/xml":
54
58
  self._body_data_parsed = xmltodict.parse(self.body_data)
55
59
  self._fields.update({key: self.Field(value=value) for key, value in self._body_data_parsed.items()})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: afgutils
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Shared support functions
5
5
  Author: Araz Heydarov
6
6
  Author-email: araz.heydarov@asiafinancegroup.com
@@ -1,6 +1,6 @@
1
1
  from setuptools import find_packages, setup
2
2
 
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
4
4
  DESCRIPTION = "Shared support functions"
5
5
  LONG_DESCRIPTION = "Shared support functions"
6
6
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes