@@ -1396,16 +1396,12 @@ def _setHTTPExtraHeaders():
13961396 raise SqlmapSyntaxException (errMsg )
13971397
13981398 elif not conf .requestFile and len (conf .httpHeaders or []) < 2 :
1399- conf .httpHeaders .append ((HTTP_HEADER .ACCEPT_LANGUAGE , "en-us,en;q=0.5" ))
1400- if not conf .charset :
1401- conf .httpHeaders .append ((HTTP_HEADER .ACCEPT_CHARSET , "ISO-8859-15,utf-8;q=0.7,*;q=0.7" ))
1402- else :
1399+ if conf .charset :
14031400 conf .httpHeaders .append ((HTTP_HEADER .ACCEPT_CHARSET , "%s;q=0.7,*;q=0.1" % conf .charset ))
14041401
14051402 # Invalidating any caching mechanism in between
1406- # Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
1407- conf .httpHeaders .append ((HTTP_HEADER .CACHE_CONTROL , "no-cache,no-store" ))
1408- conf .httpHeaders .append ((HTTP_HEADER .PRAGMA , "no-cache" ))
1403+ # Reference: http://stackoverflow.com/a/1383359
1404+ conf .httpHeaders .append ((HTTP_HEADER .CACHE_CONTROL , "no-cache" ))
14091405
14101406def _defaultHTTPUserAgent ():
14111407 """
@@ -1415,13 +1411,6 @@ def _defaultHTTPUserAgent():
14151411
14161412 return "%s (%s)" % (VERSION_STRING , SITE )
14171413
1418- # Firefox 3 running on Ubuntu 9.04 updated at April 2009
1419- #return "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.9) Gecko/2009042113 Ubuntu/9.04 (jaunty) Firefox/3.0.9"
1420-
1421- # Internet Explorer 7.0 running on Windows 2003 Service Pack 2 english
1422- # updated at March 2009
1423- #return "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
1424-
14251414def _setHTTPUserAgent ():
14261415 """
14271416 Set the HTTP User-Agent header.
0 commit comments