hogg
hogg copied to clipboard
Inefficient force-ssl detector
Websites may redirect twice or more, as in an example below
2022-12-26T21:12:41.253 [DEBUG] redirecting 'http://www.facebook.com/' to 'https://www.facebook.com/'
2022-12-26T21:12:41.254 [DEBUG] starting new connection: https://www.facebook.com/
2022-12-26T21:12:41.256 [TRACE] registering event source with poller: token=Token(419430401), interests=READABLE | WRITABLE
2022-12-26T21:12:41.358 [TRACE] signal: Want
2022-12-26T21:12:41.358 [TRACE] signal found waiting giver, notifying
2022-12-26T21:12:41.358 [TRACE] poll_want: taker wants!
2022-12-26T21:12:41.501 [TRACE] signal: Want
2022-12-26T21:12:41.501 [TRACE] signal: Want
2022-12-26T21:12:41.502 [DEBUG] redirecting 'https://www.facebook.com/' to 'https://www.facebook.com/unsupportedbrowser'
2022-12-26T21:12:41.703 [INFO ] Forced HTTPS redirection detected: www.facebook.com
After first redirect, it was clear website have force-ssl enabled. Handling second redirect wasn't needed.