Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for logFileNameIsTooLong (0.48 sec)

  1. pkg/routes/logs_test.go

    	oversizeFileName := fmt.Sprintf("%032768s", "a")
    	normalFileName := fmt.Sprintf("%0255s", "a")
    
    	// check file with oversize name.
    	if !logFileNameIsTooLong(oversizeFileName) {
    		t.Error("failed to check oversize filename")
    	}
    
    	// check file with normal name which doesn't exist.
    	if logFileNameIsTooLong(normalFileName) {
    		t.Error("failed to check normal filename")
    	}
    
    	// check file with normal name which does exist.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 21 16:25:48 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  2. pkg/routes/logs.go

    	if logFileNameIsTooLong(actual) {
    		http.Error(resp, "file not found", http.StatusNotFound)
    		return
    	}
    	http.ServeFile(resp.ResponseWriter, req.Request, actual)
    }
    
    func logFileListHandler(req *restful.Request, resp *restful.Response) {
    	logdir := "/var/log"
    	http.ServeFile(resp.ResponseWriter, req.Request, logdir)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 21 16:25:48 UTC 2022
    - 2.2K bytes
    - Viewed (0)
Back to top