mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-19 13:51:01 +00:00
missing includes in cgi scripts
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@583 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
a8cf370b50
commit
2734c2835a
3 changed files with 15 additions and 6 deletions
4
lc.cgi
4
lc.cgi
|
|
@ -33,6 +33,7 @@ print "Pragma: no-cache"
|
|||
print
|
||||
form = cgi.FieldStorage()
|
||||
import linkcheck
|
||||
import linkcheck.lc_cgi
|
||||
if not linkcheck.lc_cgi.checkform(form):
|
||||
linkcheck.lc_cgi.logit(form, form)
|
||||
linkcheck.lc_cgi.printError(sys.stdout)
|
||||
|
|
@ -52,5 +53,6 @@ else:
|
|||
config["externlinks"].append(linkcheck.getLinkPat("^file:", strict=1))
|
||||
|
||||
# start checking
|
||||
config.appendUrl(linkcheck.UrlData.GetUrlDataFrom(form["url"].value, 0))
|
||||
config.appendUrl(linkcheck.UrlData.GetUrlDataFrom(
|
||||
form["url"].value, 0, config))
|
||||
linkcheck.checkUrls(config)
|
||||
|
|
|
|||
7
lc.fcgi
7
lc.fcgi
|
|
@ -27,6 +27,7 @@ try:
|
|||
"\r\n")
|
||||
form = req.getFieldStorage()
|
||||
import linkcheck
|
||||
import linkcheck.lc_cgi
|
||||
if not linkcheck.lc_cgi.checkform(form):
|
||||
linkcheck.lc_cgi.logit(form, req.env)
|
||||
linkcheck.lc_cgi.printError(req.out)
|
||||
|
|
@ -40,13 +41,15 @@ try:
|
|||
if form.has_key("anchors"): config["anchors"] = 1
|
||||
if not form.has_key("errors"): config["verbose"] = 1
|
||||
if form.has_key("intern"):
|
||||
config["internlinks"].append(linkcheck.getLinkPat("^(ftp|https?)://"+linkcheck.lc_cgi.getHostName(form)))
|
||||
config["internlinks"].append(linkcheck.getLinkPat(
|
||||
"^(ftp|https?)://"+linkcheck.lc_cgi.getHostName(form)))
|
||||
else:
|
||||
config["internlinks"].append(linkcheck.getLinkPat(".+"))
|
||||
# avoid checking of local files
|
||||
config["externlinks"].append(linkcheck.getLinkPat("^file:", strict=1))
|
||||
# start checking
|
||||
config.appendUrl(linkcheck.UrlData.GetUrlDataFrom(form["url"].value, 0))
|
||||
config.appendUrl(linkcheck.UrlData.GetUrlDataFrom(
|
||||
form["url"].value, 0, config))
|
||||
linkcheck.checkUrls(config)
|
||||
req.Finish()
|
||||
except:
|
||||
|
|
|
|||
10
lc.sz_fcgi
10
lc.sz_fcgi
|
|
@ -15,7 +15,9 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
import sys, re, thread, sz_fcgi, linkcheck
|
||||
import sys, re, thread, sz_fcgi
|
||||
import linkcheck
|
||||
import linkcheck.lc_cgi
|
||||
|
||||
def func (fcg, req):
|
||||
req.out.write("Content-type: text/html\r\n"
|
||||
|
|
@ -36,13 +38,15 @@ def func (fcg, req):
|
|||
if form.has_key("anchors"): config["anchors"] = 1
|
||||
if not form.has_key("errors"): config["verbose"] = 1
|
||||
if form.has_key("intern"):
|
||||
config["internlinks"].append(linkcheck.getLinkPat("^(ftp|https?)://"+linkcheck.lc_cgi.getHostName(form)))
|
||||
config["internlinks"].append(linkcheck.getLinkPat(
|
||||
"^(ftp|https?)://"+linkcheck.lc_cgi.getHostName(form)))
|
||||
else:
|
||||
config["internlinks"].append(linkcheck.getLinkPat(".+"))
|
||||
# avoid checking of local files
|
||||
config["externlinks"].append(linkcheck.getLinkPat("^file:", strict=1))
|
||||
# start checking
|
||||
config.appendUrl(linkcheck.UrlData.GetUrlDataFrom(form["url"].value, 0))
|
||||
config.appendUrl(linkcheck.UrlData.GetUrlDataFrom(
|
||||
form["url"].value, 0, config))
|
||||
linkcheck.checkUrls(config)
|
||||
req.Finish()
|
||||
thread.exit()
|
||||
|
|
|
|||
Loading…
Reference in a new issue