Skip to content

Commit

Permalink
replace deprecated call to cgi.parse. fixes irmen#68
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen authored and gst committed Aug 23, 2023
1 parent f67c8bb commit d572f85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .lgtm.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Pyro5/utils/httpgateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import sys
import re
import cgi
import urllib.parse
import uuid
import json
from wsgiref.simple_server import make_server
Expand Down Expand Up @@ -304,7 +304,7 @@ def pyro_app(environ, start_response):
return option_request(start_response)
else:
"""GET POST"""
parameters = singlyfy_parameters(cgi.parse(environ['wsgi.input'], environ))
parameters = singlyfy_parameters(urllib.parse.parse_qs(environ["QUERY_STRING"]))
return process_pyro_request(environ, path[5:], parameters, start_response)
else:
return invalid_request(start_response)
Expand All @@ -314,7 +314,7 @@ def pyro_app(environ, start_response):

def singlyfy_parameters(parameters):
"""
Makes a cgi-parsed parameter dictionary into a dict where the values that
Makes a parsed querystring parameter dictionary into a dict where the values that
are just a list of a single value, are converted to just that single value.
"""
for key, value in parameters.items():
Expand Down

0 comments on commit d572f85

Please sign in to comment.