Intro
Before an HTTP client can send a message to a server, it needs to establish a TCP/IP connection between the clien and the server using Internet Protocal (IP) addresses and port numbers.
TCP requires:
- IP Address of host server computer
- TCP Port number
All of these can get from URL. If port number is not provided, it’s default port 80.
URL
Nine-part general URL format:1
<scheme>://<user>:<password>@<host>:<port>/<path>;<params>?<query>#<frag>
Each path segment can have its own params component1
http://www.joes-hardware.com/hammers;sale=false/index.html;graphics=true
RTSP URLs are identifiers for audio and video media resources that cen be retrieved through the Real Time Streaming Protocal.
Message
No message is going upstream.
Request message format:1
2
3
4<method> <request-URL> <version>
<headers>
<entity-body>
Response message:1
2
3
4<version> <status> <reson-phrase>
<headers>
<entity-body>
A set of HTTP headers should always end in a blank line (bare CRLF). However, clients and servers should accept messages without the final CRLF.
Overall Range | Defined Range | Category |
---|---|---|
100-199 | 100-101 | Informational |
200-299 | 200-206 | Successful |
300-399 | 300-305 | Redirection |
400-499 | 400-415 | Client Error |
500-599 | 500-505 | Server Error |