browser - How does SSL work on Re-directs? -


i interested in trying figure out going on when user types in, example

https://www.bing.com 

which lands them on

http://www.bing.com 

if you'll notice, www.bing.com apparently doesnt support https, page returned has no cert associated it. shouldn't browser complain this? what's more, when looking @ http headers, never see ridirect or indicates page returned not https version (guess expecting indication happened).

for example, gmail similar -

i go https://gmail.com

and end on mail.google.com or accounts.google.com depending on whether i'm logged in or not. @ least these sites give me cert, unlike bing, how come browser doesn't complain url's mismatched? seems should cert gmail.com case, right? (the cert on gmail redirect mail.google.com, makes no mention wildcard or otherwise of gmail.com)

there's nothing special going on. it's simple http redirect, you'll see if ignore ssl certificate error. (https://www.bing.com serves certificate issued akamai.) remember, once tell browser ignore cert error, remember choice rest of session.

if instruct browser ignore ssl certificate error, following happens inside ssl-encrypted connection:

get https://www.bing.com/ http/1.1 host: www.bing.com connection: keep-alive accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 user-agent: mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/27.0.1453.73 safari/537.36 accept-encoding: gzip,deflate,sdch accept-language: en-us,en;q=0.8,es;q=0.6  http/1.1 302 moved temporarily server: akamaighost content-length: 0 location: http://www.bing.com/ date: thu, 02 may 2013 22:02:28 gmt connection: keep-alive 

there's no rule against https site redirecting plain http1, browser normal request http://www.bing.com. since we're on plain http page, there's nothing display (warning or otherwise) regarding certificates.

1 - except in situations involving post requests, browsers issue warnings.

the other sites mention work similarly, except redirect gmail.com https://mail.google.com. mail.google.com has own certificate, distinct https://www.gmail.com's certificate.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -