开发者

What does an HTTPS request look like?

What additional changes are required to make this simple HTTP header to speak to a HTTPS enabled server.

GET /index.php HTTP/1.1

Host: localhost

[CR]

[CR]

EDIT

To add some context, all I'm trying to do is open a TCP port (443) and read the index page but the server seems to return a 400 - Bad request along with a message that goes "You're speaking plain HTTP to an SSL-enabled serv开发者_开发问答er port." I thought this probably meant altering the header in some fashion.


HTTP runs on top of secured channel. No adjustments are needed at all on HTTP level. You need to encrypt the whole traffic going to the socket (after it leaves HTTP client code) and decrypt the traffic coming from the socket before it reaches HTTP client.


You encrypt the payload with the information from the server to encrypt. This is done via handshake on a server by server basis, so you can't just fake it once have it work everywhere.

The payload includes the query string, cookies, form, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜