mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-01 11:34:41 +00:00
Check for allowed HTTP GET method before parsing anchors in HTML file contents.
This commit is contained in:
parent
17ce930611
commit
147bf31e1e
2 changed files with 11 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue