mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-22 23:24:44 +00:00
set httplib debug
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1338 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
e44048cd3e
commit
65e20df2c6
2 changed files with 5 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ def main (url):
|
|||
host = parts[1]
|
||||
path = urlparse.urlunsplit(('', '', parts[2], parts[3], parts[4]))
|
||||
h = httplib.HTTPConnection(host)
|
||||
h.set_debuglevel(1)
|
||||
h.connect()
|
||||
h.putrequest("GET", path, skip_host=True)
|
||||
h.putheader("Host", host)
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@
|
|||
# -*- coding: iso-8859-1 -*-
|
||||
"""print headers of an url"""
|
||||
|
||||
import httplib, urlparse, sys
|
||||
import httplib
|
||||
import urlparse
|
||||
import sys
|
||||
|
||||
def main (url):
|
||||
parts = urlparse.urlsplit(url)
|
||||
host = parts[1]
|
||||
path = urlparse.urlunsplit(('', '', parts[2], parts[3], parts[4]))
|
||||
h = httplib.HTTPConnection(host)
|
||||
h.set_debuglevel(1)
|
||||
h.connect()
|
||||
h.putrequest("HEAD", path, skip_host=True)
|
||||
h.putheader("Host", host)
|
||||
|
|
|
|||
Loading…
Reference in a new issue