Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
a59bdd08
Commit
a59bdd08
authored
Sep 06, 2017
by
Fiisio
Committed by
Matt Holt
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fastcgi: use bytes.Contains and strconv.Itoa (#1857)
parent
10484cfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
caddyhttp/fastcgi/fcgiclient_test.go
caddyhttp/fastcgi/fcgiclient_test.go
+1
-1
caddyhttp/templates/templates.go
caddyhttp/templates/templates.go
+1
-1
No files found.
caddyhttp/fastcgi/fcgiclient_test.go
View file @
a59bdd08
...
@@ -155,7 +155,7 @@ func sendFcgi(reqType int, fcgiParams map[string]string, data []byte, posts map[
...
@@ -155,7 +155,7 @@ func sendFcgi(reqType int, fcgiParams map[string]string, data []byte, posts map[
fcgi
.
Close
()
fcgi
.
Close
()
time
.
Sleep
(
1
*
time
.
Second
)
time
.
Sleep
(
1
*
time
.
Second
)
if
bytes
.
Index
(
content
,
[]
byte
(
"FAILED"
))
>=
0
{
if
bytes
.
Contains
(
content
,
[]
byte
(
"FAILED"
))
{
globalt
.
Error
(
"Server return failed message"
)
globalt
.
Error
(
"Server return failed message"
)
}
}
...
...
caddyhttp/templates/templates.go
View file @
a59bdd08
...
@@ -94,7 +94,7 @@ func (t Templates) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error
...
@@ -94,7 +94,7 @@ func (t Templates) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error
rb
.
CopyHeader
()
rb
.
CopyHeader
()
// set the actual content length now that the template was executed
// set the actual content length now that the template was executed
w
.
Header
()
.
Set
(
"Content-Length"
,
strconv
.
FormatInt
(
int64
(
buf
.
Len
()),
10
))
w
.
Header
()
.
Set
(
"Content-Length"
,
strconv
.
Itoa
(
buf
.
Len
()
))
// get the modification time in preparation to ServeContent
// get the modification time in preparation to ServeContent
modTime
,
_
:=
time
.
Parse
(
http
.
TimeFormat
,
w
.
Header
()
.
Get
(
"Last-Modified"
))
modTime
,
_
:=
time
.
Parse
(
http
.
TimeFormat
,
w
.
Header
()
.
Get
(
"Last-Modified"
))
...
...
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