URLs Flashcards
URL vs URI
a URI is “sequence of characters that identifies an abstract or physical resource”. URL is asubsetof URI that includes the network location of the resource.
What is the URL scheme?
When looking at URL Components, we described the component that prepends the colon and two forward slashes at the start of a URL as thescheme. The scheme describes the protocol family being used. (eg HTTP)
What are the required components of an HTTP request?
The HTTP method, path, & HTTP version are required and make up the request-line. TheHostheader is a required component since HTTP 1.1.The Host request header specifies the host and port number of the server to which the request is being sent.
What are the required components of an HTTP response? What are the additional optional components?
status line with a status code is required. Headers and body are optional.
What determines whether a request should useGETorPOSTas its HTTP method?
GETrequests should only retrieve content from the server. POSTrequests involve changing values that are stored on the server. Most HTML forms that submit their values to the server will usePOST Search forms are a noticeable exception to this rule: they often useGETsince they are not changing any data on the server, only viewing it.
What does the path portion of a URL represent in a modern server architecture?
In the early days of the Web, the path portion of a URL represented a physical file location on the Web server.
However, with modern server-side and client-side frameworks the path portion of the URL is used is determined by the application logic, and doesn’t necessarily bear any relationship to an underlying file structure on the server.
What are the URL components
URL components include thescheme,host(or hostname),port,path, andquery string.
What are query strings?
Query stringsare used topass additional datato the server during an HTTP Request. They take the form ofname/value pairsseparated by an=sign. Multiple name/value pairs are separated by an&sign. The start of the query string is indicated by a?.
What is URL encoding?
URL encodingis a technique wherebycertain charactersin a URL arereplaced with an ASCII code.
URL encoding is used if a character has no corresponding character in the ASCII set, is unsafe because it is used for encoding other characters, or is reserved for special use within the url.
What makes up an HTTP message exchange?
A single HTTP message exchange consists of aRequestand aResponse. The exchange generally takes place between aClientand aServer. The client sends a Request to the server and the server sends back a Response.
What makes up an HTTP request?
AnHTTP Requestconsists of arequest line(method, HTTP version, path) headers (including host), and an optionalbody.
What makes up an HTTP response?
AnHTTP Responseconsists of astatus line, optionalheaders, and an optionalbody.
What are HTTP status codes
Status codesare part of the status line in a Response. They indicate the status of the request. There are various categories of status code.
What does it mean that HTTP is stateless?
This means that each Request/ Response cycle is independent of Request and Responses that came before or those that come after.H
How can statefulness be simulated?
Statefulness can be simulatedthrough techniques which usesession IDs,cookies, andAJAX.
How can we make HTTP more secure?
HTTP isinherently unsecure. Security can be increased by usingHTTPS, enforcingSame-origin policy, and using techniques to preventSession HijackingandCross-site Scripting.
Why is HTTP not secure?
Hypertext Transfer Protocol (HTTP) is not secure because it sends data between web browsers and servers in plain text, which can be read by anyone with access to the network traffic
What are the three important security services provided by TLS?
Encryption:a process of encoding a message so that it can only be read by those with an authorized means of decoding the message
Authentication:a process to verify the identity of a particular party in the message exchange
Integrity:a process to detect whether a message has been interfered with or faked
Do you need to provide all the services provided by TLS when using it?
While not mandated, all three services are generally used together to provide the most secure connection possible.