Skip to content

Commit

Permalink
Read other request body.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiarn committed Jan 31, 2023
1 parent e026af1 commit 1a1b829
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ajenti-core/aj/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ def __init__(self, env, start_response=None):
environ=self.env,
keep_blank_values=1
)

elif self.method in ['OPTIONS', 'PROPFIND', 'UPLOAD']:
# Read other request's body (like XML)
if 'wsgi.input' in self.env:
self.body = self.env['wsgi.input'].read()

else:
# prevent hanging on weird requests
self.env['REQUEST_METHOD'] = 'GET'
Expand Down

0 comments on commit 1a1b829

Please sign in to comment.