Check for allowed HTTP GET method before parsing anchors in HTML file contents.

This commit is contained in:
Bastian Kleineidam 2010-11-17 19:13:26 +01:00
parent 17ce930611
commit 147bf31e1e
2 changed files with 11 additions and 0 deletions

View file

@ -12,6 +12,9 @@ Fixes:
remove whitespace.
- checking: Make sure the check for external domain is done after all
HTTP redirections.
- checking: Check for allowed content read before trying to
parse anchors in HTML file.
Closes: SF bug #3110569
Changes:
- cmdline: Don't log a warning if URL has been redirected.

View file

@ -598,15 +598,23 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
return True
def set_title_from_content (self):
"""Check if it's allowed to read content before execution."""
if self.method_get_allowed:
super(HttpUrl, self).set_title_from_content()
def get_anchors (self):
"""Check if it's allowed to read content before execution."""
if self.method_get_allowed:
super(HttpUrl, self).get_anchors()
def content_allows_robots (self):
"""Check if it's allowed to read content before execution."""
if not self.method_get_allowed:
return False
return super(HttpUrl, self).content_allows_robots()
def check_warningregex (self):
"""Check if it's allowed to read content before execution."""
if self.method_get_allowed:
super(HttpUrl, self).check_warningregex()