Suppress false redirect warnings for URLs with fragments#113
Merged
Suppress false redirect warnings for URLs with fragments#113
Conversation
Co-authored-by: becheran <22472855+becheran@users.noreply.github.com>
Co-authored-by: becheran <22472855+becheran@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix anchor targets to resolve reported warnings
Suppress false redirect warnings for URLs with fragments
Dec 6, 2025
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.
URLs with fragments (e.g.,
https://example.com/page#anchor) incorrectly trigger redirect warnings. Fragments are client-side only and never sent to servers, causing the response URL (without fragment) to mismatch the original URL (with fragment).Changes
check_redirectto compare URLs component-by-component (scheme, host, port, path, query) instead of full URL equality, effectively ignoring fragmentsExample
Before:
After:
Real redirects still produce warnings as expected.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
en.wikipedia.org/home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 /home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 lib --emit=dep-info,metadata,link 64-REDACTED-linux-gnu/bin/rust-lld embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C --gd�� /debug/build/ope/home/REDACTED/work/mlc/mlc/target/debug/build/getrandom-830a0a00e7afa51e/build_sccc --noexecstack lib/rustlib/x86_64-REDACTED-linux-gnu/bin/gcc-ld/ld.lld -der_rsa_sig.d >cc ssl-build/instal-Wl,--version-script=/tmp/rustcTEYk1X/list /usr/local/sbin/-Wl,--no-undefined-version lib/rustlib/x86_-m64(dns block)./target/release/mlc ./target/release/mlc /tmp/test_fragments.md ndor/bin/as n.o ssl/�� openssl-build/install/lib/cmake/OpenSSL/OpenSSLConfig.cmake ssl.d; \ fi s nclude -I s ons ssl/�� penssl-sys-ae0514d51d0b74da/out/openssl-build/install/include/openssl/modes.h as nfig/composer/vendor/bin/as clude -Iproviderbasename io_ssl.d.tmp sr/local/ssl" e(dns block)./target/release/mlc ./target/release/mlc /tmp/test_fragments.md -I ons -lib�� 4d51d0b74da/out/openssl-build/install/include/openssl/pemerr.h enssl-build/install/lib/engines-3" /x86_64-linux-gnu/13/cc1 crypto/aes/aesni/home/REDACTED/work/mlc/mlc/target/release/build/native-tls-129fac7a7e83831a/build-v providers/implementations/kem/li644 sr/local/ssl" e ome/�� penssl-sys-ae0514d51d0b74da/out/openssl-build/install/include/openssl/bn.h /include/prov /snap/bin/as crypto/bn/rsaz-abash -I /usr/bin/as ib-der_wrap_gen.o(dns block)google.de/home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 /home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 lib --emit=dep-info,metadata,link 64-REDACTED-linux-gnu/bin/rust-lld embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C --gd�� /debug/build/ope/home/REDACTED/work/mlc/mlc/target/debug/build/getrandom-830a0a00e7afa51e/build_sccc --noexecstack lib/rustlib/x86_64-REDACTED-linux-gnu/bin/gcc-ld/ld.lld -der_rsa_sig.d >cc ssl-build/instal-Wl,--version-script=/tmp/rustcTEYk1X/list /usr/local/sbin/-Wl,--no-undefined-version lib/rustlib/x86_-m64(dns block)slashdot.org/home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 /home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 lib --emit=dep-info,metadata,link 64-REDACTED-linux-gnu/bin/rust-lld embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C --gd�� /debug/build/ope/home/REDACTED/work/mlc/mlc/target/debug/build/getrandom-830a0a00e7afa51e/build_sccc --noexecstack lib/rustlib/x86_64-REDACTED-linux-gnu/bin/gcc-ld/ld.lld -der_rsa_sig.d >cc ssl-build/instal-Wl,--version-script=/tmp/rustcTEYk1X/list /usr/local/sbin/-Wl,--no-undefined-version lib/rustlib/x86_-m64(dns block)www.example.com/home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 /home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 lib --emit=dep-info,metadata,link 64-REDACTED-linux-gnu/bin/rust-lld embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C --gd�� /debug/build/ope/home/REDACTED/work/mlc/mlc/target/debug/build/getrandom-830a0a00e7afa51e/build_sccc --noexecstack lib/rustlib/x86_64-REDACTED-linux-gnu/bin/gcc-ld/ld.lld -der_rsa_sig.d >cc ssl-build/instal-Wl,--version-script=/tmp/rustcTEYk1X/list /usr/local/sbin/-Wl,--no-undefined-version lib/rustlib/x86_-m64(dns block)www.google.com/home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 /home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 lib --emit=dep-info,metadata,link 64-REDACTED-linux-gnu/bin/rust-lld embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C --gd�� /debug/build/ope/home/REDACTED/work/mlc/mlc/target/debug/build/getrandom-830a0a00e7afa51e/build_sccc --noexecstack lib/rustlib/x86_64-REDACTED-linux-gnu/bin/gcc-ld/ld.lld -der_rsa_sig.d >cc ssl-build/instal-Wl,--version-script=/tmp/rustcTEYk1X/list /usr/local/sbin/-Wl,--no-undefined-version lib/rustlib/x86_-m64(dns block)www.google.de/home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 /home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 lib --emit=dep-info,metadata,link 64-REDACTED-linux-gnu/bin/rust-lld embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C --gd�� /debug/build/ope/home/REDACTED/work/mlc/mlc/target/debug/build/getrandom-830a0a00e7afa51e/build_sccc --noexecstack lib/rustlib/x86_64-REDACTED-linux-gnu/bin/gcc-ld/ld.lld -der_rsa_sig.d >cc ssl-build/instal-Wl,--version-script=/tmp/rustcTEYk1X/list /usr/local/sbin/-Wl,--no-undefined-version lib/rustlib/x86_-m64(dns block)www.mozilla.org/home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 /home/REDACTED/work/mlc/mlc/target/debug/deps/end_to_end-c67ddac374098736 lib --emit=dep-info,metadata,link 64-REDACTED-linux-gnu/bin/rust-lld embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C --gd�� /debug/build/ope/home/REDACTED/work/mlc/mlc/target/debug/build/getrandom-830a0a00e7afa51e/build_sccc --noexecstack lib/rustlib/x86_64-REDACTED-linux-gnu/bin/gcc-ld/ld.lld -der_rsa_sig.d >cc ssl-build/instal-Wl,--version-script=/tmp/rustcTEYk1X/list /usr/local/sbin/-Wl,--no-undefined-version lib/rustlib/x86_-m64(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.