Repository navigation
Conversation
is_knowntype() scanned only hts_mime[], so the 26 extensions of hts_mime_modern[] (webp, woff2, mp4, json...) were unknown: photo.webp served as image/jpeg was saved as photo.webp.jpg, and ishtml() said -1 for them. A hts_mime_find() helper now scans both tables, and get_httptype_sized() and give_mimext() use it too. The ishtml() verdict for these extensions moves from -1 to 0, like .png: -%N0 and -%N1 no longer probe them, -p1 skips them and -n takes them. Test 764 pins the save name in each delayed mode and the -p and -n verdicts, through a new wizardnonhtml self-test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
-%N0 sends a HEAD request to learn an unknown extension's type, so the /photo.foo row reached www.example.com and could stall for two minutes on a network that drops packets. Pass nosback=1, as test 353 does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
is_knowntype()now also reads the modern MIME table. Sophoto.webpserved asimage/jpegis saved asphoto.jpg, notphoto.webp.jpg, and the 26 modern extensions count as known non-HTML types, like.png.This changes more than save names. In
-%N0and-%N1these files get no HEAD probe.-p1now skips them, and-nnow takes them from other hosts. An--updateof an old mirror can rename a file such asphoto.webp.jpgtophoto.jpg.Test 764 checks the save name in the three delayed modes and the
-pand-nverdicts. It fails on a build without the fix, and the.pngand.foocontrols do not change.tools/parser-diff.shpasses--self-checkand finds no difference againstorigin/masteron any leg.