• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Doubt in HTTP

 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm read in some document,

It's said ::

HTTP is connection less.

and in some document said ::


HTTP is connection base.



Please explain to me what choice is correct ... ???
 
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Somkiat,
HTTP is a protocol that can be used to send HTML pages between browser and server. It is 'stateless' in that it doesn't remember anything about the previous request.

Ray
 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTP is reuest/response based statelss protocol i.e No state is maintained across requests.

If we look definition of 'connection' in HTTP 1.1 RFC

connection
A transport layer virtual circuit established between two programs
for the purpose of communication.

So connection based/connection less term is generally applied to transport levels protocols ( e.g TCP/IP is connection based while UDP is connectionless).
HTTP is not a trasnport layer protocol so I think connection based/connection less does not make any sense. Applicable terms are statfeul/stateless.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pete Morgan spoke about it in his notes at http://www.sarahandpete.com/work/SCEAexamnotes.pdf

HTTP 1.0 (Hyper Text Transfer Protocol) Port 80. Built on top of TCP/IP. Stateless, connection less and directional. Client opens a connection (using a URL � the direction) and sends request to the server, the server responds using the same connection, then the connection is closed. It is up to the client to optionally maintain the session (through cookies or URL re-writing).

HTTP 1.1 (Hypertext Transfer Protocol) Port 80. Same as HTTP 1.0 except there is an option to keep the connection alive from request to request. This would be known as connection oriented if it weren't for the fact that either side can potentially drop the connection at any time (Apache does after 15 seconds), as such it is still 'connection-less'. However, some people think it is connect oriented because you need a connection to be open to do a request at all. I disagree, but I get the impression this is what Sun thinks, I suppose that is what counts for the exam at least, it is very confusing.



Regards,
Dan
 
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic