Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a6ff09

Browse files
committed
fix for a bug reported by Marek Sarvas
1 parent 4464d73 commit 6a6ff09

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

doc/THANKS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ Richard Safran <[email protected]>
269269
Tomoyuki Sakurai <[email protected]>
270270
for submitting to the FreeBSD project the sqlmap 0.5 port
271271

272+
Marek Sarvas <[email protected]>
273+
for reporting a minor bug
274+
272275
Philippe A. R. Schaeffer <[email protected]>
273276
for reporting a minor bug
274277

lib/request/basic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ def checkCharEncoding(encoding):
100100
translate = { 'windows-874':'iso-8859-11' }
101101

102102
#http://philip.html5.org/data/charsets-2.html
103-
if encoding and encoding.startswith('cp-'):
103+
if encoding.startswith('cp-'):
104104
encoding = 'cp%s' % encoding[3:]
105+
elif ';' in encoding:
106+
encoding = encoding[:encoding.find(';')]
105107
elif encoding in translate:
106108
encoding = translate[encoding]
107109
try:

0 commit comments

Comments
 (0)