Limbadri Ch
Web Application Penetration Testing
2 min readJan 9, 2020

--

HTTP BASICS

Def:-HTTP means hyper text transport protocol in this data process as request -response between client-server protocol over Internet .An http client sends a request message to http server.Then the server give the response to the client ,with a response message .

HTTP is a stateless protocol. In other words, the current request does not know what has been done in the previous requests.
Browser
Whenever if you want to send request with URL from your browser to get web resource using http Ex: http://www.lumixtralighting.com/index.html, the browser turns onto the URL into the request message and sends it to the HTTP server. The HTTP server analyze the request message, and returns you an suitable response message, which is either the resource you requested or an error message.


HTTP Request :-
it consist of below things

A Request line :-the first line of the request header is called the request line ,it has below things.

  • request -method -name,GET,POST ,PUT,TRACE .DELETE.HEAD.OPTION.

The client can use any one from these methods to send the request to server.

  • request-URL:specifies the resource requested.
  • HTTP -version two versions are currently in use :HTTP/1.0 ,HTTP/1.1

A Request header:-It contains ,host name, accepted image, accepted language, accepted user agent, and content length.

An Empty line:-it is separate the request header and optionally body of message.

A message body:-it contains the user name password account no. address phone no. and other html content.


HTTP Response:-
The format of the HTTP response message is contains below things:

Status line:-The first line is called the Status line, followed by optional response header(s).
The status line has the following things:-

HTTP/Version :- The HTTP version used in this session. Either HTTP/1.0 and HTTP/1.1.
Status code:- a 3-digit number generated by the server to reflect the outcome of the request.
Reason for Status:- gives a short explanation to the status code.
Common status code and reason phrase are “200 OK”, “404 Not Found”, “403 Forbidden”, “500 Internal Server Error”.

Response header :- it contains the server type ,set cookie,location.date,connection.

An Empty line:-it is separate the request header and optionally body of message.

A message body:-it contains the user name password account no. address phone no. and other html content.


Status Codes:-
1xx :informational
Request is received and server is processing.

2xx :Success
Action was successfully received ,understood and accepted.

3xx :Redirection
further action must be taken in order to complete the request .

4xx : Client error
Request contains incorrect syntax

5xx :Server error
Server Failed to fulfil an apparently valid request.

--

--