Trying to figure out why gzip fails
This commit is contained in:
@@ -449,6 +449,16 @@ async def alpinebits_server_handshake(
|
||||
try:
|
||||
body = gzip.decompress(body)
|
||||
logger.info("Successfully decompressed gzip content")
|
||||
|
||||
# log request to file like in wix-form/test
|
||||
logs_dir = "logs"
|
||||
if not os.path.exists(logs_dir):
|
||||
os.makedirs(logs_dir, mode=0o755, exist_ok=True)
|
||||
log_filename = f"{logs_dir}/alpinebits_request_{datetime.now().strftime('%Y%m%d_%H%M%S')}.xml"
|
||||
with open(log_filename, "wb") as f:
|
||||
f.write(body)
|
||||
|
||||
|
||||
except Exception as e:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
|
||||
Reference in New Issue
Block a user