feat: add support for application/tlsrpt+gzip
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
bef1b64af7
commit
38fe3a49c1
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
|||
import argparse
|
||||
import os
|
||||
import dataclasses
|
||||
import gzip
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
|
@ -47,7 +48,7 @@ class Reporter(bottle.Bottle):
|
|||
bottle.response.add_header('Accept', 'application/tlsrpt+gzip')
|
||||
bottle.response.add_header('Accept', 'application/tlsrpt+json')
|
||||
if 'application/tlsrpt+gzip' in bottle.request.content_type:
|
||||
self.handle(self.decompress(bottle.request.body))
|
||||
self.handle(json.load(gzip.open(bottle.request.body)))
|
||||
elif 'application/tlsrpt+json' in bottle.request.content_type:
|
||||
self.handle(json.load(bottle.request.body))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue