Home | History | Annotate | Download | only in http

Lines Matching refs:Dir

190 	ts := httptest.NewServer(StripPrefix("/test", FileServer(Dir("."))))
256 dir: true,
277 t.Errorf("test %q: listing dir, full output is %q, want prefix %q and suffix %q", test.name, s, dirListPrefix, dirListSuffix)
280 t.Errorf("test %q: listing dir, filename escaped to %q, want %q", test.name, trimmed, test.escaped)
286 func mustRemoveAll(dir string) {
287 err := os.RemoveAll(dir)
303 ts := httptest.NewServer(StripPrefix("/bar/", FileServer(Dir(tempDir))))
333 test := func(d Dir, name string) {
347 test(Dir("/etc/"), "/hosts")
348 test(Dir("/etc/"), "hosts")
349 test(Dir("/etc/"), "../../../../hosts")
350 test(Dir("/etc"), "/hosts")
351 test(Dir("/etc"), "hosts")
352 test(Dir("/etc"), "../../../../hosts")
356 test(Dir("/etc/hosts"), "")
357 test(Dir("/etc/hosts"), "/")
358 test(Dir("/etc/hosts"), "../")
362 test := func(d Dir) {
370 test(Dir(""))
371 test(Dir("."))
372 test(Dir("./"))
457 ts := httptest.NewServer(FileServer(Dir(".")))
478 ts := httptest.NewServer(FileServer(Dir(".")))
495 dir bool
506 func (f *fakeFileInfo) IsDir() bool { return f.dir }
509 if f.dir {
525 if !f.fi.dir {
572 dir: true,
912 mux.Handle("/", FileServer(Dir("testdata")))
930 {"/dir", 301, []string{"/dir"}},
931 {"/dir/", 200, []string{"/dir", "/dir/index.html"}},
953 if path == "/" || path == "/dir" || path == "/dir/" {
955 return Dir(".").Open(".")