Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
812950b6
Commit
812950b6
authored
Oct 13, 2014
by
Jens Bissinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to use fastcgi via standard io.
parent
a760e46f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
app.go
app.go
+16
-7
config.go
config.go
+2
-0
No files found.
app.go
View file @
812950b6
...
@@ -55,15 +55,24 @@ func (app *App) Run() {
...
@@ -55,15 +55,24 @@ func (app *App) Run() {
endRunning
:=
make
(
chan
bool
,
1
)
endRunning
:=
make
(
chan
bool
,
1
)
if
UseFcgi
{
if
UseFcgi
{
if
HttpPort
==
0
{
if
UseStdIo
{
l
,
err
=
net
.
Listen
(
"unix"
,
addr
)
err
=
fcgi
.
Serve
(
nil
,
app
.
Handlers
)
// standard I/O
if
err
==
nil
{
BeeLogger
.
Info
(
"Use FCGI via standard I/O"
)
}
else
{
BeeLogger
.
Info
(
"Cannot use FCGI via standard I/O"
,
err
)
}
}
else
{
}
else
{
l
,
err
=
net
.
Listen
(
"tcp"
,
addr
)
if
HttpPort
==
0
{
l
,
err
=
net
.
Listen
(
"unix"
,
addr
)
}
else
{
l
,
err
=
net
.
Listen
(
"tcp"
,
addr
)
}
if
err
!=
nil
{
BeeLogger
.
Critical
(
"Listen: "
,
err
)
}
err
=
fcgi
.
Serve
(
l
,
app
.
Handlers
)
}
}
if
err
!=
nil
{
BeeLogger
.
Critical
(
"Listen: "
,
err
)
}
err
=
fcgi
.
Serve
(
l
,
app
.
Handlers
)
}
else
{
}
else
{
app
.
Server
.
Addr
=
addr
app
.
Server
.
Addr
=
addr
app
.
Server
.
Handler
=
app
.
Handlers
app
.
Server
.
Handler
=
app
.
Handlers
...
...
config.go
View file @
812950b6
...
@@ -61,6 +61,7 @@ var (
...
@@ -61,6 +61,7 @@ var (
SessionAutoSetCookie
bool
// auto setcookie
SessionAutoSetCookie
bool
// auto setcookie
SessionDomain
string
// the cookie domain default is empty
SessionDomain
string
// the cookie domain default is empty
UseFcgi
bool
UseFcgi
bool
UseStdIo
bool
MaxMemory
int64
MaxMemory
int64
EnableGzip
bool
// flag of enable gzip
EnableGzip
bool
// flag of enable gzip
DirectoryIndex
bool
// flag of display directory index. default is false.
DirectoryIndex
bool
// flag of display directory index. default is false.
...
@@ -241,6 +242,7 @@ func init() {
...
@@ -241,6 +242,7 @@ func init() {
SessionAutoSetCookie
=
true
SessionAutoSetCookie
=
true
UseFcgi
=
false
UseFcgi
=
false
UseStdIo
=
false
MaxMemory
=
1
<<
26
//64MB
MaxMemory
=
1
<<
26
//64MB
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment