Skip to content

Commit

Permalink
gofix.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Dec 7, 2011
1 parent d9769e6 commit 6c07301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cgiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (h *CgiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
file = filepath.Join(h.Root, file)

f, e := os.Stat(file)
if e != nil || f.IsDirectory() {
if e != nil || f.IsDir() {
if len(h.DefaultApp) > 0 {
file = h.DefaultApp
}
Expand All @@ -58,7 +58,7 @@ func (h *CgiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
cgih.ServeHTTP(w, r)
} else {
if (f != nil && f.IsDirectory()) || file == "" {
if (f != nil && f.IsDir()) || file == "" {
tmp := filepath.Join(file, "index.html")
f, e = os.Stat(tmp)
if e == nil {
Expand Down

0 comments on commit 6c07301

Please sign in to comment.