Skip to content

Commit

Permalink
Add feature to list and debug logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Logan Riggs committed Feb 8, 2022
1 parent 8c0bf96 commit 4d8d4ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions tabpy/tabpy_server/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ def _get_features(self):
}

features["evaluate_enabled"] = self.settings[SettingsParameters.EvaluateEnabled]
features["gzip_enabled"] = self.settings[SettingsParameters.GzipEnabled]
return features

def _build_tabpy_state(self):
Expand Down
3 changes: 2 additions & 1 deletion tabpy/tabpy_server/handlers/evaluation_plane_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def _post_impl(self):

self.logger.log(logging.DEBUG, f"PreProcessing POST request ...")
if self.settings[SettingsParameters.GzipEnabled] == True and 'Content-Encoding' in self.request.headers and 'gzip' in self.request.headers['Content-Encoding']:
self.logger.log(logging.DEBUG, f"Decoding Gzipped POST request ...")
self.logger.log(logging.DEBUG, f"Decoding Gzipped POST request ... '{self.request.body}'")
body = json.loads(gzip.decompress(self.request.body).decode("utf-8"))
self.logger.log(logging.DEBUG, f"Decoded Gzipped POST request ... '{body}'")
else:
body = json.loads(self.request.body)
self.logger.log(logging.DEBUG, f"Processing POST request '{body}'...")
Expand Down

0 comments on commit 4d8d4ae

Please sign in to comment.