Modern browsers have several redirect mechanisms. One of them is refresh
. You can use it in:
HTTP header
Refresh: 5; url=https://gitlab.com/
HTML content
html
<meta http-equiv="Refresh" content="5; URL=https://gitlab.com/" />
Browsers allow different ways to fill refresh
content. Therefore, the parsing algorithms for it are rather complicated:
This repository presents the implementation of this algorithm on rust.
Run tests:
cargo test
Run fuzzing (https://rust-fuzz.github.io/book/introduction.html):
cargo fuzz run fuzz_refresh_parser