-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在release提供的chm的 数学特殊函数 中,部分应有页面不存在 #28
Comments
This seems to be a redirection issue. |
Having searched over the wget mailing list and found that Test code for server
const http = require('http');
// `/`: a page with links to `/301.html`, `302.html`, `subpage.html`, and imgs with src of `/301.gif`, `302.gif`
// `/301.html`: http 301 redirect to `subpage.html`
// `/302.html`: http 302 redirect to `subpage.html`
// `/301.gif`: http 301 redirect to `image.gif`
// `/302.gif`: http 302 redirect to `image.gif`
// `subpage.html`: a html page with whatever content
// `image.gif`: a small gif with color
const server = http.createServer((req, res) => {
const { url, method } = req;
if (url === '/') {
// Route: /
res.setHeader('Content-Type', 'text/html');
res.write('<!DOCTYPE html><html>');
res.write('<body>');
res.write('<p>Click on the links below:</p>');
res.write('<a href="/301.html">301 Redirect</a><br>');
res.write('<a href="/302.html">302 Redirect</a><br>');
res.write('<a href="/subpage.html">subpage.html</a><br>');
res.write('<img src="/301.gif" style="width: 30px" alt="301 Redirect Image"><br>');
res.write('<img src="/302.gif" style="width: 30px" alt="302 Redirect Image"><br>');
res.write('<img src="/image.gif" style="width: 30px" alt="Image"><br>');
res.write('</body>');
res.write('</html>');
res.end();
} else if (url === '/301.html') {
// Route: /301.html
res.writeHead(301, { Location: '/subpage.html' });
res.end();
} else if (url === '/302.html') {
// Route: /302.html
res.writeHead(302, { Location: '/subpage.html' });
res.end();
} else if (url === '/301.gif') {
// Route: /301.gif
res.writeHead(301, { Location: '/image.gif' });
res.end();
} else if (url === '/302.gif') {
// Route: /302.gif
res.writeHead(302, { Location: '/image.gif' });
res.end();
} else if (url === '/subpage.html') {
// Route: /subpage.html
res.setHeader('Content-Type', 'text/html');
res.write('<html>');
res.write('<body>');
res.write('<h1>This is subpage.html</h1>');
res.write('<p>Whatever content you want goes here.</p>');
res.write('</body>');
res.write('</html>');
res.end();
} else if (url === '/image.gif') {
// Route: /image.gif
res.setHeader('Content-Type', 'image/gif');
res.write(Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==', 'base64'));
res.end();
} else {
// Handle 404 Not Found
res.writeHead(404, { 'Content-Type': 'text/plain' });
res.end('404 Not Found');
}
});
const port = 3000;
server.listen(port, () => {
console.log(`Server is listening on port ${port}`);
}); Here are result tested with wget:
Raw wget log
# wget -V
GNU Wget 1.21.4 built on cygwin.
-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
+ntlm +opie +psl +ssl/gnutls
Wgetrc:
/etc/wgetrc (system)
Locale:
/usr/share/locale
Compile:
gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
-DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -DNDEBUG
-march=nocona -msahf -mtune=generic -O2 -pipe
Link:
gcc -DNDEBUG -march=nocona -msahf -mtune=generic -O2 -pipe -pipe
-lpcre2-8 -luuid -lidn2 -lnettle -lgnutls -lz -lpsl ../lib/libgnu.a
-liconv -lintl /usr/lib/libunistring.dll.a
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.
# wget --adjust-extension --page-requisites --convert-links --force-directories --recursive --level=10 -e robots=off --span-hosts --timeout=5 --tries=180 --no-verbose --retry-connrefused --waitretry=2 --read-timeout=13 --page-requisites http://127.0.0.1:3000/
2024-01-14 12:47:04 URL:http://127.0.0.1:3000/ [393] -> "127.0.0.1+3000/index.html" [1]
2024-01-14 12:47:04 URL:http://127.0.0.1:3000/subpage.html [98] -> "127.0.0.1+3000/301.html" [1]
2024-01-14 12:47:04 URL:http://127.0.0.1:3000/subpage.html [98] -> "127.0.0.1+3000/302.html" [1]
2024-01-14 12:47:04 URL:http://127.0.0.1:3000/image.gif [70] -> "127.0.0.1+3000/301.gif" [1]
2024-01-14 12:47:04 URL:http://127.0.0.1:3000/image.gif [70] -> "127.0.0.1+3000/302.gif" [1]
FINISHED --2024-01-14 12:47:04--
Total wall clock time: 0.02s
Downloaded: 5 files, 729 in 0.002s (286 KB/s)
# wget --adjust-extension --page-requisites --convert-links --force-directories --recursive --level=10 -e robots=off --span-hosts --timeout=5 --tries=180 --no-verbose --retry-connrefused --waitretry=2 --read-timeout=13 --trust-server-names http://127.0.0.1:3000/
2024-01-14 12:47:09 URL:http://127.0.0.1:3000/ [393] -> "127.0.0.1+3000/index.html" [1]
2024-01-14 12:47:09 URL:http://127.0.0.1:3000/subpage.html [98] -> "127.0.0.1+3000/subpage.html" [1]
2024-01-14 12:47:09 URL:http://127.0.0.1:3000/subpage.html [98] -> "127.0.0.1+3000/subpage.html" [1]
2024-01-14 12:47:09 URL:http://127.0.0.1:3000/image.gif [70] -> "127.0.0.1+3000/image.gif" [1]
2024-01-14 12:47:09 URL:http://127.0.0.1:3000/image.gif [70] -> "127.0.0.1+3000/image.gif" [1]
FINISHED --2024-01-14 12:47:09--
Total wall clock time: 0.02s
Downloaded: 5 files, 729 in 0.002s (308 KB/s)
|
20240915-dev 已发布,与 2024.09 相比增加了 --trust-server-names 选项。 |
以“beta函数”为例,打开这一链接,将会提示“无法访问此页 确保 Web 地址//ieframe.dll/dnserrordiagoff.htm# 正确”。
在左侧的目录中,也看不到这些函数介绍的页面的存在,疑似未正确整合进chm中。
The text was updated successfully, but these errors were encountered: