Gateway: parse_qs is in urllib.parse now

This commit is contained in:
Athanasius 2021-11-04 13:09:26 +00:00
parent daa1ae0ac1
commit e3b4148eba

View File

@ -11,10 +11,10 @@ import hashlib
import logging
import zlib
from datetime import datetime
from urllib.parse import parse_qs
import gevent
import simplejson
import urlparse
import zmq.green as zmq
from bottle import Bottle, request, response
from gevent import monkey
@ -185,7 +185,7 @@ def get_decompressed_message():
# At this point, we're not sure whether we're dealing with a straight
# un-encoded POST body, or a form-encoded POST. Attempt to parse the
# body. If it's not form-encoded, this will return an empty dict.
form_enc_parsed = urlparse.parse_qs(message_body)
form_enc_parsed = parse_qs(message_body)
if form_enc_parsed:
logger.info('Request is form-encoded, compressed, from %s' % (get_remote_address()))
# This is a form-encoded POST. The value of the data attrib will