Skip to content

Commit

Permalink
Removed debug in CGI, streaming works.
Browse files Browse the repository at this point in the history
  • Loading branch information
vifino committed Jan 9, 2016
1 parent d37fe86 commit 8cc81b3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 36 deletions.
64 changes: 32 additions & 32 deletions modules/glue/generated_lua.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions modules/middleware/cgi.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package middleware

import (
"fmt"
"github.com/gin-gonic/gin"
"io"
"net/http"
Expand All @@ -20,9 +19,7 @@ type flushWriter struct {

func (fw flushWriter) Write(p []byte) (n int, err error) {
n, err = fw.orig_writer.Write(p)
fmt.Println("Flushing or nah?")
if fw.f != nil {
fmt.Println("Flushin!")
fw.f.Flush()
}
return
Expand Down Expand Up @@ -70,7 +67,6 @@ func CGI_Dynamic(path, dir string, args, env []string) func(*gin.Context) {
}
fw := flushWriter{c.Writer, flushfields{orig_writer: c.Writer}}
if f, ok := c.Writer.(http.Flusher); ok {
fmt.Println("Flusher found! Yay!")
fw.f = f
}
handler.ServeHTTP(fw, c.Request)
Expand Down

0 comments on commit 8cc81b3

Please sign in to comment.