0c07f7adcc
Epic revert of 0ac8bf5 and adding OncePerServerBlock
...
Turns out having each server block share a single server.Config during initialization when the Setup functions are being called was a bad idea. Sure, startup and shutdown functions were only executed once, but they had no idea what their hostname or port was. So here we revert to the old way of doing things where Setup may be called multiple times per server block (once per host associated with the block, to be precise), but the Setup functions now know their host and port since the config belongs to exactly one virtualHost. To have something happen just once per server block, use OncePerServerBlock, a new function available on each Controller.
2015-10-14 23:45:28 -06:00
f9bc74626d
Address various lint and gocyclo warnings. Fixes #253
2015-10-11 16:28:02 -04:00
0ca0d552eb
change to official http2 repo
...
The golang.org/x/net/http2 is now the official http2 repo.
It is advised to change the imports to it.
2015-09-25 14:10:03 +02:00
740a6a7ad5
Use func from stdlib to clone *tls.Config for calming vet
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
2015-09-10 20:52:49 -07:00
0ac8bf58ea
core: Run startup/shutdown functions only once
...
Even if defined for multiple hosts. Startup or shutdown callbacks registered by any directive (startup, shutdown, markdown, git, log, etc.) will only run as many times as it appears in the Caddyfile, not repeated for each host that shares that server block. Fixing this involved refactoring three packages (yeesh) and we need to restore some tests that are no longer valid (that used to verify splitting a multiServerBlock into multiple serverBlocks).
2015-08-01 13:08:31 -06:00
1a82943db2
core: Simplify Server initializer
2015-07-11 12:00:21 -06:00
c811d416a7
log: Customizable default error function
2015-06-15 10:17:09 -06:00
00093a2052
core: Fix to allow empty (wildcard) host
2015-06-09 23:07:32 -06:00
41e1f1ffa5
Update error strings (start with lowercase letters)
2015-06-07 20:49:17 -04:00
c78eb50eb8
tls: Client authentication
2015-06-01 23:22:11 -06:00
69939108e1
removed tls cache option
2015-05-25 14:42:09 -03:00
e4b50aa814
Fix more lint warnings
2015-05-24 22:52:34 -04:00
d6df615588
tls: Mainstream compatibility improvements, better security rating
2015-05-21 10:37:39 -06:00
5f72b7438a
Created app package, and better TLS compatibility with HTTP/2
2015-05-21 00:06:53 -06:00
823a7eac03
Added tls option block including: ciphers, protocols and cache options
...
Signed-off-by: Guilherme Rezende <guilhermebr@gmail.com >
2015-05-18 16:38:21 -03:00
da6a097dcc
adding crypto/tls sessioncache
2015-05-05 00:25:29 -03:00
995edf0566
Bringing in latest from master; refactoring under way
2015-05-04 11:02:46 -06:00
e04e06d6e2
Fix for Issue 13: Trouble running in Docker containers (or binding to 0.0.0.0)
2015-04-28 22:31:42 +01:00
c1916c0fb5
Server header in response
...
Version number purposefully excluded (for now?)
2015-04-26 23:09:26 -06:00
aa89b95075
Replaced cpu directive with command line flag
2015-04-24 20:08:14 -06:00
0cbaed2443
A few helpful comments
2015-04-21 16:00:16 -06:00
feec7c5b40
Virtual hosts and SNI support
2015-04-15 14:11:32 -06:00
b7c8afab2f
Respond with 404 if requesting server's config file
2015-04-12 17:44:02 -06:00
d0a0216602
Added flag to disable http/2 support (still enabled by default)
2015-04-09 10:08:22 -06:00
d33256f1dc
Refactor: Middleware chain uses Handler instead of HandlerFunc
2015-04-02 23:30:54 -06:00
29fec4742e
Detailed godoc; better error handling convention
2015-03-29 22:01:42 -06:00
9378f38371
Major refactoring for better error handling
2015-03-28 16:37:37 -06:00
da72a5fbcd
Controller can register functions to run at shutdown
2015-03-26 23:22:48 -06:00
1146a9b90b
Recover from panic during requests
2015-03-26 22:52:27 -06:00
2fbfafc408
New startup and shutdown directives
2015-03-26 09:52:03 -06:00
ba0d63d722
Adapted std lib file server and gutted it
2015-03-24 21:55:51 -06:00
35225fe2d3
Docs and comments, la la
2015-03-20 18:11:54 -06:00
fb78592425
Experimental HTTP/2 support
2015-03-16 11:44:54 -06:00
974acbf38c
Partial support for location contexts in config files
2015-03-03 09:49:01 -07:00
ae2a2d5b00
Godoc for middleware packages and server package
2015-01-29 23:52:18 -07:00
8471c2d9d8
Updated docs; renamed a couple utility files
2015-01-29 22:52:21 -07:00
fe1978c6f5
New 'cpu' directive; now uses all cores by default (if needed)
2015-01-21 14:10:52 -07:00
24fc2ae59e
Major refactoring; more modular middleware
2015-01-18 23:11:21 -07:00
04162aaa79
Added flag to specify config file location
2015-01-13 16:22:16 -07:00
4497a16fb0
Early prototype; initial commit
2015-01-13 12:43:45 -07:00