Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for directoryToResponse (0.18 sec)

  1. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        try {
          if (!path.startsWith("/") || path.contains("..")) throw new FileNotFoundException();
    
          File file = new File(root + path);
          return file.isDirectory()
              ? directoryToResponse(path, file)
              : fileToResponse(path, file);
        } catch (FileNotFoundException e) {
          return new MockResponse()
              .setStatus("HTTP/1.1 404")
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
Back to top