Skip to content

Commit db9c80f

Browse files
committed
Merge pull request revel#843 from revel/feature/sane-http-timeout-defaults
Feature/sane http timeout defaults
2 parents 12e1fd9 + 6183335 commit db9c80f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

flash.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
// E.g. the Post/Redirect/Get pattern:
1313
// http://en.wikipedia.org/wiki/Post/Redirect/Get
1414
type Flash struct {
15+
// `Data` is the input which is read in `restoreFlash`, `Out` is the output which is set in a FLASH cookie at the end of the `FlashFilter()`
1516
Data, Out map[string]string
1617
}
1718

server.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ func Run(port int) {
9494
}
9595

9696
Server = &http.Server{
97-
Addr: localAddress,
98-
Handler: http.HandlerFunc(handle),
97+
Addr: localAddress,
98+
Handler: http.HandlerFunc(handle),
99+
ReadTimeout: time.Minute,
100+
WriteTimeout: time.Minute,
99101
}
100102

101103
runStartupHooks()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy