hogg icon indicating copy to clipboard operation
hogg copied to clipboard

Inefficient force-ssl detector

Open yallxe opened this issue 2 years ago • 0 comments

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.

yallxe avatar Dec 26 '22 21:12 yallxe