mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-09 23:24:44 +00:00
Reset content type setting after loading HTTP headers.
This commit is contained in:
parent
123d62b1f4
commit
5515645af6
2 changed files with 3 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
Fixes:
|
||||
- checking: HTML parser detects and handles stray "<" characters before
|
||||
end tags.
|
||||
- checking: Reset content type setting after loading HTTP headers again.
|
||||
|
||||
|
||||
7.0 "Plots with a View" (released 28.5.2011)
|
||||
|
|
|
|||
|
|
@ -560,6 +560,7 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
|||
response = self.url_connection.getresponse(True)
|
||||
self.timeout = headers.http_timeout(response)
|
||||
self.headers = response.msg
|
||||
self.content_type = None
|
||||
self.persistent = not response.will_close
|
||||
if self.persistent and self.method == "HEAD":
|
||||
# Some servers send page content after a HEAD request,
|
||||
|
|
@ -623,6 +624,7 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
|||
response = self._try_http_response()
|
||||
response = self.follow_redirections(response, set_result=False)[1]
|
||||
self.headers = response.msg
|
||||
self.content_type = None
|
||||
# Re-read size info, since the GET request result could be different
|
||||
# than a former HEAD request.
|
||||
self.add_size_info()
|
||||
|
|
|
|||
Loading…
Reference in a new issue