Write a program to fix the error being produced by the Infinite file? - Web Security
Write a program to fix the error being produced by the Infinite file?
- The infinite file error can be solved when the data will be read continuously from the file.
- The error can be solved by using the keys that provide only the resources that are required.
- The following program 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 converts the requested file in such a way that if the file exists it shows the messages as ok otherwise it shows an error.
- Limited file access is to be given to the file to remove the error from the infinite file type.