Write a program that defines the use of fail-safe approach? - Web Security
Write a program that defines the use of fail-safe approach?
- Fail-safe approach is being designed to save the system from any failure that can come without any reason.
- This includes developing of the client system that requires the password to be sent to authentication server and if the server is down then the access to all the users is denied by default.
- The program is given to use in case of failure and it is as follows:
osw.write ("HTTP/1.0 200 OK\n\n");
while (c != -1) {
sb.append((char)c);
c = fr.read();
}
osw.write (sb.toString());
- This program defines the security of the requested file and it tells that if the file is opened and read successfully then return OK response and sends the content of the file.