Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
812950b6
authored
2014-10-13 13:47:44 +0200
by
Jens Bissinger
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Allow to use fastcgi via standard io.
1 parent
a760e46f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
app.go
config.go
app.go
View file @
812950b
...
...
@@ -55,15 +55,24 @@ func (app *App) Run() {
endRunning
:=
make
(
chan
bool
,
1
)
if
UseFcgi
{
if
HttpPort
==
0
{
l
,
err
=
net
.
Listen
(
"unix"
,
addr
)
if
UseStdIo
{
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
{
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
{
app
.
Server
.
Addr
=
addr
app
.
Server
.
Handler
=
app
.
Handlers
...
...
config.go
View file @
812950b
...
...
@@ -61,6 +61,7 @@ var (
SessionAutoSetCookie
bool
// auto setcookie
SessionDomain
string
// the cookie domain default is empty
UseFcgi
bool
UseStdIo
bool
MaxMemory
int64
EnableGzip
bool
// flag of enable gzip
DirectoryIndex
bool
// flag of display directory index. default is false.
...
...
@@ -241,6 +242,7 @@ func init() {
SessionAutoSetCookie
=
true
UseFcgi
=
false
UseStdIo
=
false
MaxMemory
=
1
<<
26
//64MB
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment