mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Fix old urllib/urllib2/urlparse usage.
This commit is contained in:
parent
0f7ede4569
commit
029986af24
7 changed files with 42 additions and 39 deletions
|
|
@ -1002,11 +1002,11 @@ class HTTPHandler(logging.Handler):
|
|||
Send the record to the Web server as an URL-encoded dictionary
|
||||
"""
|
||||
try:
|
||||
import http.client, urllib
|
||||
import http.client, urllib.parse
|
||||
host = self.host
|
||||
h = http.client.HTTP(host)
|
||||
url = self.url
|
||||
data = urllib.urlencode(self.mapLogRecord(record))
|
||||
data = urllib.parse.urlencode(self.mapLogRecord(record))
|
||||
if self.method == "GET":
|
||||
if (url.find('?') >= 0):
|
||||
sep = '&'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue