The Wayback Machine - https://web.archive.org/web/20240711235033/https://www.geeksforgeeks.org/http-headers-digest/
Open In App

HTTP headers | Digest

Last Updated : 31 Oct, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

The Digest HTTP header is a response HTTP header that provides the requested resource with a small value generated by a hash function from a whole message. The Digest HTTP header is a response header that provides a digest of the requested resource. The entire representation is used to calculate the digest. Multiple digest values for a single resource is also possible as the representation depends on Content-Type and Content-Encoding.

Syntax:

Digest:<digest-algorithm>=<digest-value>

Directives: This header accepts two directives as mentioned above and described below:

  • <digest-algorithm>: It contains defined supported algorithms, example SHA-256 and SHA-512.
  • <digest-value>: It holds the result of encoding and applying the digest algorithm to the resource representation.

Examples:

  • It provides the resource with the sha-256 algorithm and also provides the digest value.
    Digest: sha-256=nOJRJgeeksforgeeksN3OWDUo9DBPE=
  • It provides the resource with the sha-512 algorithm and also provides the digest value. In addition to that, it provides UNIX sum algorithm which is subject to collisions.
    Digest: sha-512=\vdtgeeksforgeeks8nOJRJN3OWDDBPE=, unixsum=69

Supported Browsers: The browsers are compatible with HTTP Digest header are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


Similar Reads

HTTP headers | Want-Digest
Before discussing about HTTP Want-Digest Header, let us first understand what is Digest (or message digest) ? HTTP header Digest is an encrypted fixed-size representation of a message generated using a hash function. A hash function can be any function that maps the data of arbitrary size to a fixed size. Message digests are easy to encrypt but ver
2 min read
HTTP headers | Access-Control-Expose-Headers
The HTTP Access-Control-Expose-Headers header is a response header that is used to expose the headers that have been mentioned in it. By default 6 response headers are already exposed which are known as CORS-safelisted response headers. They are namely- Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma. Syntax: Access-Co
1 min read
HTTP headers | Access-Control-Allow-Headers.
The HTTP Access-Control-Allow-Headers header is a response-type header that is used to indicate the HTTP headers. It can be used during a request and is used in response to a CORS preflight request, that checks to see if the CORS protocol is understood and a server is aware using specific methods and headers, which includes the Access-Control-Reque
1 min read
HTTP headers | Access-Control-Request-Headers
Access-Control-Request-Headers is a request-type header used by browsers that contains information about the different HTTP headers that will be sent by the client in the ensuing request. Whenever a client initiates a request to a server, the browser checks if the request needs a CORS preflight or not. In case a CORS preflight request is required,
2 min read
HTTP headers | Location
The HTTP Location header is a response header that is used under 2 circumstances to ask a browser to redirect a URL (status code 3xx) or provide information about the location of a newly created resource (status code of 201). Its usage is often confused with another HTTP Header which is HTTP Content-Location header. The main difference between them
2 min read
HTTP headers | User-Agent
The HTTP headers User-Agent is a request header that allows a characteristic string that allows network protocol peers to identify the Operating System and Browser of the web-server. Your browser sends the user agent to every website you connect to. There is no conventional way of writing a user agent string as different browsers use different form
2 min read
HTTP headers | Link
For serialising one or more links in HTTP headers, the HTTP Link header-field is used. It allows the server to point an interested client to another resource containing metadata about the requested resource. It is semantically equivalent to the HTML &lt;link&gt; element. Syntax: Link: &lt;uri-reference&gt;; param1="value1" param2="value2" Directive
1 min read
HTTP headers | Save-Data
The Save-Data is a HTTP request-type header. It is used to indicate whether the client wants to turn on data saving mode or not. Here, data usage is measured in terms of cost and performance. The role of any browser is to provide optimized user experience by providing the highest possible level of performance in a minimal amount of cost. Save-Data:
2 min read
HTTP headers | Content-Type
The Content-Type header is used to indicate the media type of the resource. The media type is a string sent along with the file indicating the format of the file. For example, for image file its media type will be like image/png or image/jpg, etc. In response, it tells about the type of returned content, to the client. The browser gets to know abou
3 min read
HTTP headers | X-Forwarded-Proto
The HTTP headers are used to communicate between client and server. HTTP headers let the client and server pass additional information with an HTTP request or response. X-Forwarded-Proto (XPF) header is used to identifying the protocol that the client used to connect with a proxy or load balancer. It can be HTTP or HTTPS. Your server access log usu
2 min read
three90RightbarBannerImg