Retrieving files from the server

GET Method

Preliminaries

This note provides supplementary information about the server's implementation of the standard HTTP GET method to retrieve a resource.

The GET method is the principal protocol for the vast majority of all HTTP requests. It is one of only two methods directly supported via HTML, the other being POST.

GET is the sine qua non of HTTP methods.

A browser generates a GET request when fulfilling HTML declarations similar to these:

<a href="page.html">
<img src="picture.jpg">
<link href="theme.css" type="text/css" rel="stylesheet" >
<script src="interactive.js" type="application/javascript">

When issuing a GET request, the user-agent specifies filtering, sorting, searching, and other limiting criteria in the query-string portion of a URL.

Request/response handlers

The server's request/response cycle for GET requests is handled by a sequence of modules to:

  • Validate the user's permission to access the resource.
  • Negotiate acceptance criteria with the user-agent.
  • Verify that the resource is available.
  • Dynamically compile certain types of resources.
  • Compress the resource while in transit.
  • Prepare the response headers for the return trip.
  • Send the resource itself in the response body.

This is the sequential order of handlers that fulfill GET requests:

Request Handler Optional Configurable
1 Server Name Indication no no
2 Hosts no yes
3 IP Access yes yes
4 Resource Masks yes yes
5 Raw Path no no
6 Cookies no no
7 Forbidden yes yes
8 Cross Origin yes yes
9 RBAC yes yes
10 User Agent yes yes
11 Accept Types no yes
12 Accept Language yes yes
Dynamic Handler Optional Configurable
13 Router yes yes
Response Handler Optional Configurable
14 File Permissions no no
15 Content Types no yes
16 Etag yes no
17 If Modified Since no no
18 Last Modified no no
19 Cache Control yes yes
20 Range yes no
21 Content Encoding yes yes
22 Content Length no no
23 Status Codes no yes
24 Push Priority yes yes

Success

Successful responses return status code 200 with the bytes of the resource in the response body.

Successful responses have these headers:

  • content-length even if it is zero.
  • content-type if the server is properly configured for the filename's extension.
  • last-modified with the timestamp of the file's modification time.
  • etag if the etag module is on, with the Etag hash identification for the file.
  • content-encoding if the encoding module is on, with the compression algorithm applied to the response payload.
  • content-language if the accept-language module is on, with the language tag associated with the requested resource.
  • cache-control if the cache-control module is on, containing caching instructions for the browser.
  • server with the value 'rwserve'.
  • date with the time when the server began sending the response.

For reference purposes, refer to IETF RFC 7231 Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content section 4.3.1 for the basic protocol expected of HTTP GET requests.

Read Write Tools icon

Smart tech

READ WRITE TOOLS

Read Write Hub icon

Templates & Content

READ WRITE HUB

BLUEPHRASE icon

Rediscover HTML

BLUE PHRASE

0

Retrieving files from the server

🔗 🔎