0

Http Basic Authentication – Introduction & Implementation

Hello friends, in our previous articles we’ve discussed about Http Authentication . Now we know importance of authentication\Authorization. So this is the time now to discuss about various schema available for authentication and how these are implemented. Let’s discuss about basic authentication.

HTTP provides a general framework for access control and authentication. The most common HTTP authentication is based on “Basic” schema. This page shows an introduction to HTTP Basic authentication.

How Authentication Starts

  • First HTTP client makes a request to the web server.
  • Request method doesn’t has to be GET it can be any method.
  • If web server sees that the requested resource need authentication to access then it sends backs 401 unauthorized status code along with WWW-Authenticate header.
  • Then client displays a dialog box to take username and password as input.
  • Once the credentials has been enter the client sends it using the Authorization header.
  • If the credentials are correct then server responds with 200 status code and Authentication-Info header.
  • If client sends wrong credentials in the Authorization request then server again responds with 401 status code. The client is allowed to try again and again.

Basic Authentication

Basic Authentication

We discussed that when web server sees that the requested resource need authentication to access then it sends backs 401 unauthorized status code along with WWW-Authenticate header.

Below is the response sent by server if user is unauthenticated.

WWW-Authenticate: realm=”Images”

What is Realm? Let’s discuss this.

Realm:

Servers use realm to group different parts of the server (assigns same realm, username and password other resources on the same and deeper level). Browser saves credentials for all realm’s. Whenever browser receives a WWW-Authenticate response with a realm already saved, it will automatically send the credentials without the knowledge of user. Browser also sends Authorization request directly to the URLs deeper than a level whose realm and credentials are known. This creates a session among the URls with same realm and also URIs deeper to a saved realm.

It is compulsory that this header will contain a realm directive. Realm is displayed in the dialog box.

Authorization:

Client send the request again by putting credentials in the dialog box which is displayed. Browser uses Authorization header to send this information to server. Username and password are joined together with a colon in between and then encoded using base-64 encoding method.

So if the username is “deepak” and the password is “pwd123456” than a string “deepak:pwd123456” is generated and then encoded using base64. Then this encoded result is sent to the server.

Below is the example of Authorization header.

Authorization: Basic S08tyui78ophJKL

Proxy-Authentication

Some organizations use proxy servers to authenticate users before allowing them to access the web server resources. The same mechanism is used by proxies to authenticate users but header and status codes are changed. Below are the changes:

  • Response status 407: 407 response status code is sent instead of 401. This code is meant for proxy authentication.
  • Proxy-Authenticate: Proxy-Authenticate is used instead of WWW-Authenticate.
  • Proxy-Authorization: Proxy-Authorization is used instead of Authorization when credentials are sent to server.
  • Proxy-Authentication-Info: Proxy-Authentication-Info is used instead of Authentication-Info.

The Authentication-Info Header Field

Sometime server return with addition information using Authentication-Info header.

HTTP authentication schemes can use the Authentication-Info response header field to return additional information applicable to the authentication currently in use.

The field value is a list of parameters (name/value pairs),

The Authentication-Info header field can be used in any HTTP response, independently of request method and status code. 

Security of Basic Authentication

As the user ID and password are passed over the network as clear text (it is base64 encoded, but base64 is a reversible encoding), the basic authentication scheme is not secure. HTTPS / TLS should be used in conjunction with basic authentication. Without these additional security enhancements, basic authentication should not be used to protect sensitive or valuable information.

0

Http Authentication – Introduction

Hello friends, we are in discussion about Http and various important aspects related to the same. While discussing this, we cannot ignore vary important aspect of discussion i.e. Http Authentication & Access control.

We live in world of internet where each and every information is available on the network and can be accessed by anyone. With that said, there is some confidential\proprietary information which is available and should be accessed only by authorized people. To access authorized information, we need to prove our identity and we should have access to those resources which we want.

In internet world this is accomplished via Http Authentication\Authorization.

Http also has its own authentication framework to authenticate user and provide authorized information.

HTTP provides a general framework for access control and authentication. The most common HTTP authentication is based on “Basic” schema. This page shows an introduction to HTTP framework for authentication and shows what all type of schemas are there.

HTTP Authentication Framework

RFC 7235 defines the HTTP authentication framework which can be used by a server to challenge a client request and then a client provides authentication information.

The challenge and response flow works like this:

  • Client requests a resource from server.
  • The server responds to a client with a 401(Unauthorized) response status and provides information on how to authorize with a WWW-Authenticate response header containing at least one challenge.
  • A client that wants to authenticate itself with a server, will provide its username and password.
  • Server will match credentials and then will provide resource if authentication succeeded.

Below is the flow:

Http Authentication

Proxy Authentication

The same challenge and response mechanism can be used for proxy authentication. Suppose, there is an intermediate proxy that requires authentication. As both resource authentication and proxy authentication can coexist, a different set of headers and status codes are needed.

In the case of proxies, the challenging status code is 407 (Proxy Authentication Required), the Proxy-Authenticate response header contains at least one challenge applicable to the proxy, and the Proxy-Authorization request header is used for providing the credentials to the proxy server.

Access forbidden

If a (proxy) server receives valid credentials that are not adequate to gain access for a given resource, the server should respond with the 403 Forbidden status code. 

Authentication of cross-origin images

A potential security hole that has recently been fixed by browsers is authentication of cross-site images.

Previously an image from different origin was able to show authentication dialog box to user and user has to put credentials. This way one can steal your data as credential information could be in Base64 encoded and can be cracked easily.

As part of security fix, all image resources loaded from different origins to the current document are no longer able to trigger HTTP authentication dialog, preventing user credentials being stolen if attackers were able to embed an arbitrary image into a third-party page. 

WWW-Authenticate and Proxy-Authenticate headers

The WWW-Authenticate and Proxy-Authenticate response headers define the authentication method that should be used to gain access to a resource. They need to specify which authentication scheme is used, so that the client that wishes to authorize knows how to provide the credentials. The syntax for these headers is the following:

WWW-Authenticate: <type> realm=<realm>

Proxy-Authenticate: <type> realm=<realm>

Here, <type> is the authentication scheme (“Basic” is the most common scheme and introduced below). The realm is used to describe the protected area or to indicate the scope of protection. This could be a message like “Access to the staging site” or similar, so that the user knows to which space they are trying to get access to.

Authorization and Proxy-Authorization headers

The Authorization and Proxy-Authorization request headers contain the credentials to authenticate a user agent with a (proxy) server. Here, the type is needed again followed by the credentials, which can be encoded or encrypted depending on which authentication scheme is used.

Authorization: <type> <credentials>

Proxy-Authorization: <type> <credentials>

Authentication schemes

The general HTTP authentication framework is used by several authentication schemes. Schemes can differ in security strength and in their availability in client or server software.

The most common authentication scheme is the “Basic” authentication scheme which is introduced in more details below. IANA maintains a list of authentication schemes, but there are other schemes offered by host services, such as Amazon AWS.

Common authentication schemes include:

Authentication Scheme

Description

Anonymous

An anonymous request does not contain any authentication information. This is equivalent to granting everyone access to the resource.

Basic

Basic authentication sends a Base64-encoded string that contains a user name and password for the client. Base64 is not a form of encryption and should be considered the same as sending the user name and password in clear text. If a resource needs to be protected, strongly consider using an authentication scheme other than basic authentication.

Digest

Digest authentication is a challenge-response scheme that is intended to replace Basic authentication. The server sends a string of random data called a nonce to the client as a challenge. The client responds with a hash that includes the user name, password, and nonce, among additional information. The complexity this exchange introduces and the data hashing make it more difficult to steal and reuse the user’s credentials with this authentication scheme.

Digest authentication requires the use of Windows domain accounts. The digest realm is the Windows domain name. Therefore, you cannot use a server running on an operating system that does not support Windows domains, such as Windows XP Home Edition, with Digest authentication. Conversely, when the client runs on an operating system that does not support Windows domains, a domain account must be explicitly specified during the authentication.

NTLM

NT LAN Manager (NTLM) authentication is a challenge-response scheme that is a securer variation of Digest authentication. NTLM uses Windows credentials to transform the challenge data instead of the unencoded user name and password. NTLM authentication requires multiple exchanges between the client and server. The server and any intervening proxies must support persistent connections to successfully complete the authentication.

Kerberos

This authentication service was developed at Massachusetts Institute of Technology (MIT). It involves the symmetric key encryption practice and a KDC (Key distribution center). It verifies the identities of communication parties on an unprotected network. This is achieved without depending on authentication mechanism by the host OS, without necessitating physical security of the host and without building trust on host address.

Negotiate

Negotiate authentication automatically selects between the Kerberos protocol and NTLM authentication, depending on availability. The Kerberos protocol is used if it is available; otherwise, NTLM is tried. Kerberos authentication significantly improves upon NTLM. Kerberos authentication is both faster than NTLM and allows the use of mutual authentication and delegation of credentials to remote machines.

Windows Live ID

The underlying Windows HTTP service includes authentication using federated protocols. However, the standard HTTP transports in WCF do not support the use of federated authentication schemes, such as Microsoft Windows Live ID. Support for this feature is currently available through the use of message security.

 

This is only an introduction about Http Authentication framework and schemas. In upcoming articles we’ll discuss each of these schemas in detail.

0

Http Verbs Details-Meaning & Usage

Hello friends, in our previous discussions, we discussed about What is Http, Usage and Important Terms. Today we are going to discuss about Http verbs details. We’ll see the differences, Implementation and Ideal usage for these.

What are HTTP Verbs?

HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Although they can also be nouns, these request methods are sometimes referred as HTTP verbs.

Let’s discuss about these http verbs details.

GET

The GET method requests a representation of the specified resource. Requests using GET should only retrieve data and should have no other effect. Requested resource is returned in form of xml or json.

Note: Get should be used only for retrieval. It should not change representation of any resource.

Additionally, GET APIs should be idempotent, which means that making multiple identical requests must produce same result every time until another API (POST or PUT) has changed the state of resource on server.

For any given HTTP GET API, if resource is found on server then it must return HTTP response code 200 (OK) – along with response body which is usually either XML of JSON content (due to their platform independent nature).

In case resource is NOT found on server then it must return HTTP response code 404 (NOT FOUND). Similarly, if it is determined that GET request itself is not correctly formed then server will return HTTP response code 400 (BAD REQUEST).

You can get more information about Http Status Codes here. 

Idempotent Methods:

The term idempotent is used more comprehensively to describe an operation that will produce the same results if executed once or multiple times.

Example request URIs:

HTTP GET http://www.example.com/users
HTTP GET http://www. example.com/users?size=20&page=5

HEAD

The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content.

In other words, if GET /users returns a list of users, then HEAD /users will make the same request but will not return the list of users.

HEAD requests are useful for checking what a GET request will return before actually making a GET request – like before downloading a large file or response body.

Example request URIs:

HTTP HEAD http://www.example.com/users

POST

POST is used to send data to a server to create/update a resource. The data sent to the server with POST is stored in the request body of the HTTP request.

Ideally, if a resource has been created on the origin server, the response SHOULD be HTTP response code 201 (Created) and contain an entity which describes the status of the request and refers to the new resource, and a Location header.

Many times, the action performed by the POST method might not result in a resource that can be identified by a URI. In this case, either HTTP response code 200 (OK) or 204 (No Content) is the appropriate response status.

Some other notes on POST requests:

  • POST requests are never cached
  • POST requests do not remain in the browser history
  • POST requests cannot be bookmarked
  • POST requests have no restrictions on data length

Example:

POST /test/myform.php HTTP/1.1
Host: example.com
name1=value1&age=25

PUT

The PUT method requests that the enclosed entity be stored under the supplied URI. If the URI refers to an already existing resource, it is modified; if the URI does not point to an existing resource, then the server can create the resource with that URI.

The difference between POST and PUT is that PUT requests are idempotent. That is, calling the same PUT request multiple times will always produce the same result. In contrast, calling a POST request repeatedly have side effects of creating the same resource multiple times. In addition to this POST requests are made of resource collections whereas PUT requests are made on individual resource.

If a new resource has been created by the PUT API, the origin server MUST inform the user agent via the HTTP response code 201 (Created) response and if an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate successful completion of the request.

Example request URIs:

HTTP PUT http://www.example.com/users/123

DELETE

The DELETE method deletes the specified resource.

A successful response of DELETE requests SHOULD be HTTP response code

  • 200 (OK) – if the response includes an entity describing the status, 
  • 202 (Accepted) – if the action has been queued, or 
  • 204 (No Content) – if the action has been performed but the response does not include an entity.

DELETE operations are idempotent. If you DELETE a resource, it’s removed from collection of resource. Repeatedly calling DELETE API on that resource will not change the outcome – however calling DELETE on a resource a second time will return a 404 (NOT FOUND) since it was already removed.

Example request URIs:

HTTP DELETE http://www.appdomain.com/users/123

TRACE

The TRACE method echoes the received request so that a client can see what (if any) changes or additions have been made by intermediate servers.

The HTTP TRACE method is designed for diagnostic purposes. If enabled, the web server will respond to requests that use the TRACE method by echoing in its response the exact request that was received.

This behavior is often harmless, but occasionally leads to the disclosure of sensitive information such as internal authentication headers appended by reverse proxies. This functionality could historically be used to bypass the Http Only cookie flag on cookies, but this is no longer possible in modern web browsers.

Example request URIs:

HTTP TRACE /mypage.html HTTP/1.1

OPTIONS

The OPTIONS method returns the HTTP methods that the server supports for the specified URL. This can be used to check the functionality of a web server by requesting ‘*’ instead of a specific resource.

To find out which request methods a server supports, one can use curl and issue an OPTIONS request:

curl -X OPTIONS http://example.com -i

The response then contains an Allow header with the allowed methods:

HTTP/1.1 200 OK
Allow: OPTIONS, GET, HEAD, POST
Cache-Control: max-age=604800
Date: Thu, 13 Oct 2016 11:45:00 GMT
Expires: Thu, 20 Oct 2016 11:45:00 GMT
Server: EOS (lax004/2813)
x-ec-custom-error: 1
Content-Length: 0

CONNECT

The HTTP CONNECT method method starts two-way communications with the requested resource. It can be used to open a tunnel.

For example, the CONNECT method can be used to access websites that use SSL (HTTPS). The client asks an HTTP Proxy server to tunnel the TCP connection to the desired destination. The server then proceeds to make the connection on behalf of the client. Once the connection has been established by the server, the Proxy server continues to proxy the TCP stream to and from the client.

CONNECT is a hop-by-hop method.

Hop by Hop: 

Indicates the flow the communication follows. Data pass through multiple devices with an IP address, and each is genetically named “hop”. Hop by Hop indicates analyzing the data flow at layer 3, checking all devices in the path.

Example:

CONNECT server.example.com:80 HTTP/1.1
Host: server.example.com:80

PATCH

The PATCH method applies partial modifications to a resource.

The HTTP PUT method only allows complete replacement of a document. Unlike PUT, PATCH is not idempotent, meaning successive identical patch requests may have different effects. However, it is possible to issue PATCH requests in such a way as to be idempotent.

Example:

Request

PATCH /file.txt HTTP/1.1
Host: www.example.com
Content-Type: application/example
If-Match: "e0023aa4e"
Content-Length: 100

Response

A successful response is indicated with a 204 response code, because the response does not carry a message body.

HTTP/1.1 204 No Content
Content-Location: /file.txt
ETag: "e0023aa4f"

All general-purpose HTTP servers are required to implement at least the GET and HEAD methods, and all other methods are considered optional by the specification.

Safe methods

Some of the methods (for example, HEAD, GET) are, by convention, defined as safe, which means they are intended only for information retrieval and should not change the state of the server.

This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is made aware of the fact that a possibly unsafe action is being requested – and they can update/delete the resource on server and so should be used carefully.

Http verbs details

 

 

That’s all about Http verbs for this article.

0

What is Http, Usage and Important Terms

Hello friends, today we are going to discuss about What is Http and details.

Whether you are a user or a website owner, the one word you might come across when browsing is HTTP. It is important to get the basics of HTTP to understand how Internet works and the details sent and received between your browser and the web server. Here is a beginner’s guide to What is Http attempting to explain the basics.

What is Http?

HTTP means Hypertext Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted. How server will recognize these commands and what actions Web servers and browsers should take in response to various commands. HTTP is the set of rules for transferring files (text, graphic images, sound, video, and other multimedia files) on the World Wide Web. 

HTTP functions as a request–response protocol in the client–server computing model. A web browser, for example, may be the client and an application running on a computer hosting a website may be the server. The client submits an HTTP request message to the server. The server, which provides resources such as HTML files and other content, or performs other functions on behalf of the client, returns a response message to the client. The response contains completion status information about the request and may also contain requested content in its message body.

 Let’s first discuss about how website works.

Web Request Life Cycle

 In general below is the flow of any web request. You can get more information about the flow here.

  

 

  1. User types any address in any browser e.g. google.com.
  2. Browser sends request to web server.
  3. Web server creates a new process or assign a thread to process this request.
  4. Web server processes the request and generate the response.
  5. This response is sent back to client.
  6. Now assigned process or thread is free to receive another requests.
  7. Browser displays the response to user.

This is very basic and top view of the process.

Request Message

 A simple request message from a client computer consists of the following components:

  • A request line to get a required resource, for example a request GET /content/page1.html is requesting a resource called /content/page1.html from the server.
  • Headers (Example – Accept-Language: EN).
  • An empty line.
  • A message body which is optional.

All the lines should end with a carriage return and line feed. The empty line should only contains carriage return and line feed without any spaces.

Response Message

 A simple response from the server contains the following components:

  • HTTP Status Code (For example HTTP/1.1 301 Moved Permanently, means the requested resource was permanently moved and redirecting to some other resource).
  • Headers (Example – Content-Type: html)
  • An empty line.
  • A message body which is optional.

All the lines in the server response should end with a carriage return and line feed. Similar to request, the empty line in a response also should only have carriage return and line feed without any spaces.

Stateless Protocol

HTTP is called a stateless protocol because each command is executed independently, without any knowledge of the commands that came before it. Server receives the request, process it and create a response for client. Once response is transferred to client then connection drops and next request from same client is treated independently.

User Agent

A web browser is an example of a user agent (UA). Other types of user agent include the indexing software used by search providers (web crawlers), voice browsers, mobile apps, and other software that accesses, consumes, or displays web content.  

Server

A server is the machine which host the resource and can serve client based on the request. All web resources are hosted on any server.  Dedicated computers and appliances may be referred to as Web servers as well.

 Web servers are able to map the path component of a Uniform Resource Locator (URL) into:

  • A local file system resource (for static requests)
  • An internal or external program name (for dynamic requests)

For a static request the URL path specified by the client is relative to the web server’s root directory.

Consider the following URL as it would be requested by a client:

http://www.example.com/path/file.html

The client’s user agent will translate it into a connection to www.example.com with the following HTTP 1.1 request:

GET /path/file.html HTTP/1.1
Host: www.example.com

The web server on www.example.com will append the given path to the path of its root directory. On an Apache server, this is commonly /home/www (on Unix machines, usually /var/www). The result is the local file system resource:

 /home/www/path/file.html

The web server then reads the file, if it exists, and sends a response to the client’s web browser. The response will describe the content of the file and contain the file itself or an error message will return saying that the file does not exist or is unavailable.

Session

An HTTP session is a sequence of network request-response transactions. An HTTP client initiates a request by establishing a Transmission Control Protocol (TCP) connection to a particular port on a server (typically port 80, occasionally port 8080; see List of TCP and UDP port numbers). An HTTP server listening on that port waits for a client’s request message. Upon receiving the request, the server sends back a status line, such as “HTTP/1.1 200 OK”, and a message of its own. The body of this message is typically the requested resource, although an error message or other information may also be returned.

HTTP sessions are opened by an HTTP Client (i.e. the user’s browser) via a user agent and a connection Request Message is sent to an HTTP Server (i.e. the Web Server). Once the response has been delivered the Web Server closes the connection. This type of connection is known as Stateless in that it exists only for the duration of the data exchange.

Let us take an example that you want to open a page “home.html” from the site “yoursite.com”. Below is how the request from the client browser should look like to get a “home.html” page from “yoursite.com”.

HTTP Request Structure:

GET /home.html HTTP/1.1
Host: www.yoursite.com

 

The response from the web server should look like below:

HTTP Response Structure:

HTTP/1.1 200 OK
Date: Sun, 28 Jul 2013 15:37:37 GMT
Server: Apache
Last-Modified: Sun, 07 Jul 2013 06:13:43 GMT
Transfer-Encoding: chunked
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Webpage Content

 

Chunked transfer encoding is a method in which the server responds with a data in chunks and this used in place of Content-Length header. The communication is stopped when a zero length of chunk is received and this method is used in HTTP Version 1.1.

Authentication

Authentication is a process in which the credentials provided are compared to those on file in a database of authorized users’ information on a local operating system or within an authentication server. If the credentials match, the process is completed and the user is granted authorization for access. 

HTTP provides multiple authentication schemes such as basic access authentication and digest access authentication which operate via a challenge-response mechanism whereby the server identifies and issues a challenge before serving the requested content. 

We’ll discuss more about these authentication schemas in detail in upcoming articles.  

Methods

HTTP defines methods (sometimes referred to as verbs) to indicate the desired action to be performed on the identified resource. What this resource represents, whether pre-existing data or data that is generated dynamically, depends on the implementation of the server.

GET:

The GET method requests a representation of the specified resource. Requests using GET should only retrieve data and should have no other effect.

HEAD:

The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content.

POST:

The POST method requests that the server accept the entity enclosed in the request as a new subordinate of the web resource identified by the URI. The data Posted might be, for example, an annotation for existing resources; a message for a bulletin board, newsgroup, mailing list, or comment thread; a block of data that is the result of submitting a web form to a data-handling process; or an item to add to a database.

PUT:

The PUT method requests that the enclosed entity be stored under the supplied URI. If the URI refers to an already existing resource, it is modified; if the URI does not point to an existing resource, then the server can create the resource with that URI.

DELETE:

The DELETE method deletes the specified resource.

TRACE:

The TRACE method echoes the received request so that a client can see what (if any) changes or additions have been made by intermediate servers.

OPTIONS:

The OPTIONS method returns the HTTP methods that the server supports for the specified URL. This can be used to check the functionality of a web server by requesting ‘*’ instead of a specific resource.

CONNECT:

The CONNECT method converts the request connection to a transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy

PATCH:

The PATCH method applies partial modifications to a resource.

All general-purpose HTTP servers are required to implement at least the GET and HEAD methods, and all other methods are considered optional by the specification.

Safe methods

Some of the methods (for example, HEAD, GET, OPTIONS and TRACE) are, by convention, defined as safe, which means they are intended only for information retrieval and should not change the state of the server.

We’ll discuss more about these methods, usage and limitations in detail in upcoming articles.

Status Codes

Depending on the availability or otherwise of the Resource HTTP provides an appropriate status code (also referred to as the ‘Server Response’) determined by the protocol. These are as follows:

Secure HTTP (HTTPS)

Now you understand HTTP then what is that HTTPS? HTTPS is the secured HTTP protocol required to send and receive information securely over internet. Nowadays it is mandatory for all websites to have HTTPS protocol to have secured internet. Browsers like Google Chrome will show an alert with “Not Secure” message in the address bar if the site is not served over HTTPS.

This typically involves the use of an SSL Certificate which creates a secure, encrypted connection between the browser and the web server.

This is typically used for secure areas of websites where sensitive data is transferred such as payment details or login credentials. In recent years though HTTPS has been listed as a Google ranking factor and more and more websites are moving to HTTPS for that reason.

Whereas HTTP uses port 80, HTTPS uses port 443 for communication.

We’ll discuss more about SSL, usage and implementations in detail in upcoming articles.

Versions

Year

HTTP Version

1991

0.9

1996

1.0

1997

1.1

2015

2.0

 

Http 2015 is relatively new but still in implementation phase. We can say that 1.1 is the mostly used version as of now.

How to Check HTTP Request and Response on Chrome?

Let us take Google Chrome the popular browser, but the process remains same in all other browsers to view the details.

  • Open a webpage in Google Chrome and go to “View > Developer > Developer Tools” menu.
  • You can also open the developer console by right clicking on the page and choose “Inspect” option.
  • Go to “Network” tab and then reload the page. Now you will see the loading time for each single component on the page.
  • Here you can see request\Response headers.
  • You can check complete response also in highlighted Response tab.

What is Http

 

That’s all about Http for this session.

0

Http Response Codes 5xx & Meanings

Hello friends, Today we are going to discuss about http response codes 5xx. In previous articles we have discussed about

Http status code 1xx

Http status code 2xx

Http status code 3xx

Http status code 4xx

In this article we are going to discuss about http response codes 5xx and meaning.

Note: Http response codes 5xx are indication of Server Errors. ** is prefixed for most commonly used status codes.

So let’s start.

**500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request. A generic error message, given when no more specific message is suitable.

**501 Not Implemented

The server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

**502 Bad Gateway

The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.

**503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.

**504 Gateway Timeout

The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI.

505 HTTP Version Not Supported

The server does not support, or refuses to support, the HTTP protocol version that was used in the request message. The server is indicating that it is unable or unwilling to complete the request.

The response should contain an entity describing why that version is not supported and what other protocols are supported by that server.

506 Variant Also Negotiates (Experimental)

The 506 status code indicates that the server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.

507 Insufficient Storage (WebDAV)

The 507 (Insufficient Storage) status code means the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. This condition is considered to be temporary

508 Loop Detected (WebDAV)

The 508 (Loop Detected) status code indicates that the server terminated an operation because it encountered an infinite loop while processing a request with “Depth: infinity”. This status indicates that the entire operation failed.

509 Bandwidth Limit Exceeded (Apache)

This status code, while used by many servers, is not specified in any RFCs.

510 Not Extended

The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request

If the 510 response contains information about extensions that were not present in the initial request then the client MAY repeat the request if it has reason to believe it can fulfill the extension policy by modifying the request according to the information provided in the 510 response. Otherwise the client MAY present any entity included in the 510 response to the user, since that entity may include relevant diagnostic information.

511 Network Authentication Required

The 511 status code indicates that the client needs to authenticate to gain network access.

The response representation SHOULD contain a link to a resource that allows the user to submit credentials (e.g. with a HTML form).

The 511 status should not be generated by origin servers; it is intended for use by intercepting proxies that are interposed as a means of controlling access to the network.

550 Permission Denied

The server is stating the account you have currently logged in as does not have permission to perform the action you are attempting. You may be trying to upload to the wrong directory or trying to delete a file.

598 Network read timeout error

This status code is not specified in any RFCs, but is used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.

599 Network connect timeout error

This status code is not specified in any RFCs, but is used by some HTTP proxies to signal a network connect timeout behind the proxy to a client in front of the proxy.

That’s it about Http response codes 5xx. There are few more status codes which are unofficial but still used. You can check the list here.