File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1107,6 +1107,18 @@ def parseTargetUrl():
11071107 conf .url = "%s://%s:%d%s" % (conf .scheme , conf .hostname , conf .port , conf .path )
11081108 conf .url = conf .url .replace (URI_QUESTION_MARKER , '?' )
11091109
1110+ if not conf .referer and intersect (REFERER_ALIASES , conf .testParameter , True ):
1111+ debugMsg = "setting the HTTP Referer header to the target url"
1112+ logger .debug (debugMsg )
1113+ conf .httpHeaders = filter (lambda (key , value ): key != HTTPHEADER .REFERER , conf .httpHeaders )
1114+ conf .httpHeaders .append ((HTTPHEADER .REFERER , conf .url ))
1115+
1116+ if not conf .host and intersect (HOST_ALIASES , conf .testParameter , True ):
1117+ debugMsg = "setting the HTTP Host header to the target url"
1118+ logger .debug (debugMsg )
1119+ conf .httpHeaders = filter (lambda (key , value ): key != HTTPHEADER .HOST , conf .httpHeaders )
1120+ conf .httpHeaders .append ((HTTPHEADER .HOST , getHostHeader (conf .url )))
1121+
11101122def expandAsteriskForColumns (expression ):
11111123 """
11121124 If the user provided an asterisk rather than the column(s)
You can’t perform that action at this time.
0 commit comments