Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
d373b893
Unverified
Commit
d373b893
authored
Feb 01, 2018
by
Tim Neutkens
Committed by
GitHub
Feb 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don’t finish request when it’s already finished (#3660)
parent
abe6e3ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
index.js
server/index.js
+5
-0
No files found.
server/index.js
View file @
d373b893
...
...
@@ -18,6 +18,7 @@ import getConfig from './config'
// We need to go up one more level since we are in the `dist` directory
import
pkg
from
'../../package'
import
*
as
asset
from
'../lib/asset'
import
{
isResSent
}
from
'../lib/utils'
const
blockedPages
=
{
'/_document'
:
true
,
...
...
@@ -309,6 +310,10 @@ export default class Server {
}
const
html
=
await
this
.
renderToHTML
(
req
,
res
,
pathname
,
query
)
if
(
isResSent
(
res
))
{
return
}
res
.
setHeader
(
'X-Powered-By'
,
`Next.js
${
pkg
.
version
}
`
)
return
sendHTML
(
req
,
res
,
html
,
req
.
method
,
this
.
renderOpts
)
}
...
...
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