0

I built a simple HTTP server in C++ programming language with no support for PHP yet.

This is a hobby project to learn and understand how the Hypertext Transfer Protocol works. According to my knowledge HTTP is a stateless protocol, but i’m thinking of providing a state mechanism in my website.

I have tried to study how its done in Apache HTTP Server when people use PHP for Web development and ss per my understanding the steps are:

1)

The server create a session ID which get sent to the client when the session is created.

2)

The session ID get stored in as an cookie ( PHPSESSID ) in the browser

3)

That cookie is sent by the browser to the server with each request

4)

The server uses that cookie which contain the session ID to know which file corresponds to that client

Is the steps above correct?

I'm asking this because the webbrowser “Internet Explorer” provide option to enable session cookies. I found this option while searching on Google. You can take a look here: http://www.library.fullerton.edu/documents/IE_settings_for_ILLiad_requests_to_work.pdf

This option of Internet Explorer got me confused. Session ID is supposed to be a cookie stored in the browser so how is this webbrowser is capable of identifying it as a session cookie?

Because of this i started to worry about my understanding. Can someone please explain to me whether or not the steps is correct and if i need to do something special so Internet Explorer can recognise my cookie as session cookie?

Thank you very much

John
  • 51
  • 1
  • 8

0 Answers0