0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
Commit graph

229 commits

Author SHA1 Message Date
Abiola Ibrahim
851026d3fa Markdown: Watch for file changes. Removed sitegen dependency for links. 2015-08-04 23:35:09 +01:00
Matthew Holt
d8c50264cc Fix parser when address is empty token
Bug detected by go-fuzz (more fuzzing is required; need larger corpus)
2015-08-03 17:31:10 -06:00
Maxime
f1f1eb040a Changed the facility of syslog to be LOCAL0 2015-08-03 12:00:17 +02:00
Matthew Holt
e63b83c8c4 markdown: report errors during initial sitegen 2015-08-01 13:08:55 -06:00
Matthew Holt
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
Maxime
7fb1c7e91d Change access log level to INFO 2015-07-30 22:01:15 +02:00
Maxime
4b92808bbf Add syslog support for log and errors directives 2015-07-30 20:29:41 +02:00
Maxime
ec51e14451 Merge branch 'master' of https://github.com/mholt/caddy 2015-07-29 23:43:26 +02:00
Maxime
0168a627a4 Added test on markdown static files generation 2015-07-29 16:21:35 +02:00
Abiola Ibrahim
e240cd5ba2 Metadata variables flattened.
Fix race condition on parsers.
Added page links generator.
2015-07-28 05:21:09 +01:00
Karthic Rao
094436c23a Complete Test set For config/setup/fastcgi.go 2015-07-27 20:19:20 +05:30
Matthew Holt
53b7b131cb Update change list, and note in comment 2015-07-25 15:18:10 -06:00
Matthew Holt
bec9b9a3f7 redir: Redirect tables
Open a redir block to bulk-specify a bunch of redirects that share a status code
2015-07-25 15:18:10 -06:00
Matt Holt
bf47951f3a Merge pull request #196 from evermax/master
markdown, browse: Integrated Context struct for templating
2015-07-25 15:15:51 -06:00
Karthic Rao
665f24d85f initial test for config/setup/fastcgi.go 2015-07-23 10:27:42 +05:30
Maxime
6451e10d3e Add context to markdown template
Created a struct containing middleware.Context, Title, Markdown and the
variables from the user to use to render the template.
The title now can be accessed via {{.Title}}.
The variables can now be accessed via {{.Var.myVariableName}}.
2015-07-21 07:58:34 +02:00
Maxime
f536bc94b2 Added the Context to the browse directive
Moved the Context type to middleware and exported it.
Users can use .Include and others in browse directive templating
Created test for the templates directive.
2015-07-17 20:07:24 +02:00
Karthic Rao
2b7ec1b023 Complete test coverage for config/setup/markdown.go 2015-07-11 00:44:31 +05:30
Matthew Holt
d3c229375c Fixed import command, added tests 2015-07-07 22:38:48 -06:00
Abiola Ibrahim
4588812d24 Gzip: Fix wildcard extension bug. 2015-07-06 06:36:48 +01:00
Matt Holt
7dbe42286d Merge pull request #174 from mholt/gzipfix
gzip: Make it gzip again

Removes mimes filter in favor of extensions filter (might be temporary)
2015-07-05 23:19:51 -06:00
Matthew Holt
b5579ca910 gzip: Remove mimes 2015-07-03 18:13:30 -06:00
Karthic Rao
93f29a7598 preliminary test case for config/setup/markdown.go 2015-07-03 10:03:22 +05:30
Matthew Holt
abf22909f1 gzip: Make it gzip again 2015-07-01 18:56:30 -06:00
Abiola Ibrahim
b030d0cf79 Merge remote-tracking branch 'upstream/master' 2015-06-29 09:16:59 +01:00
Karthic Rao
62456c1bed Complete test coverage for config/setup/templates.go 2015-06-28 07:03:42 +05:30
Abiola Ibrahim
3f1f6720ee Decouple git middleware from caddy core. Now available as an add-on at https://github.com/abiosoft/caddy-git. 2015-06-28 00:31:52 +01:00
Karthic Rao
e039577d66 export of variables undone 2015-06-27 03:49:44 +05:30
Karthic Rao
9995466a18 Initial Test case for config/setup/templates.go 2015-06-27 02:27:02 +05:30
Matthew Holt
f424f450f2 Fix typo 2015-06-25 08:55:02 -06:00
Matthew Holt
47d1f5eecf Removed tests that are not cross-platform compatible 2015-06-23 22:13:29 -06:00
Matthew Holt
d8391d6fbd core: Handle address lookup and bind errors more gracefully (fixes #136 and #164)
Addresses which fail to resolve are handled more gracefully in the two most common cases: the hostname doesn't resolve or the port is unknown (like "http" on a system that doesn't support that port name). If the hostname doesn't resolve, the host is served on the listener at host 0.0.0.0. If the port is unknown, we attempt to rewrite it as a number manually and try again.
2015-06-23 22:01:37 -06:00
Karthic Rao
a78cea7d8a test for webSocketParse function in config/setup 2015-06-24 07:05:53 +05:30
Karthic Rao
292c15cd48 Modularizing config/setup/Websocket.go and for the same 2015-06-23 14:40:27 +05:30
Guilherme Rezende
efbf01b49d change from error to a warning in errors setup 2015-06-22 23:19:48 -03:00
Matthew Holt
4b349805db browse: better-looking sort order arrows 2015-06-22 15:04:22 -06:00
Matt Holt
47096e112a Merge pull request #156 from pyed/sort
browse: Ability to sort
2015-06-22 12:40:58 -06:00
pyed
68add78230 Implement sorting functionality for "Browse" 2015-06-21 18:04:47 +03:00
Abiola Ibrahim
460c0c8a42 setup: export functions and variables for external packages. 2015-06-20 14:59:33 +01:00
Karthic Rao
9d33d9d6b0 typo corrected 2015-06-19 23:54:34 +05:30
Karthic Rao
d9729b4a2e test for config/setup/internal.go 2015-06-19 23:34:54 +05:30
Karthic Rao
13c5d25a2e Typo corrected 2015-06-19 22:30:48 +05:30
Karthic Rao
c166261513 more test cases for the test struct 2015-06-19 19:37:48 +05:30
Karthic Rao
84998a4d19 Tests for config/setup/log.go 2015-06-19 19:15:57 +05:30
Karthic Rao
65f7190030 more cases added to test struct in extParse test 2015-06-17 14:07:26 +05:30
Karthic Rao
a5a5c06716 test for function extParse written for config/setup/ext_go 2015-06-17 12:48:52 +05:30
Karthic Rao
9c832893af Merge branch 'master' of https://github.com/mholt/caddy 2015-06-17 12:46:34 +05:30
Karthic Rao
4e15901df1 solving merge conflicts 2015-06-17 12:46:12 +05:30
Karthic Rao
9a32d08e9f test for function exParse under config/setup/ext.go 2015-06-17 11:59:24 +05:30
Matthew Holt
c811d416a7 log: Customizable default error function 2015-06-15 10:17:09 -06:00
karthic rao
076fc4d72c Update
Update with missing assertion for the Next middleware being properly set , this makes sure that Ext middleware carries the requests to the further middlewares .
2015-06-13 20:25:23 +05:30
karthic rao
d7db1b9576 Added Assertions
Added assertions to check for the extensions in the order specified
2015-06-13 15:56:29 +05:30
karthic rao
2a166f088d Update ext_test.go 2015-06-13 10:05:42 +05:30
Karthic Rao
2175c68319 Preliminary test case for setup/config/ext.go 2015-06-13 09:54:54 +05:30
Abiola Ibrahim
e0f10c2b03 Gzip: Accept MIME types. 2015-06-10 22:02:08 +01:00
Matt Holt
01aca02edc Merge pull request #129 from tw4452852/rename_internal
internal: rename middleware's package name from `internal` to `inner`
2015-06-10 08:04:27 -06:00
Tw
90921a9deb rename middleware's name from internal to inner
The internal package has the special meaning in go
(see https://golang.org/s/go14internal).
So rename it to `inner`.

Signed-off-by: Tw <tw19881113@gmail.com>
2015-06-10 15:48:41 +08:00
AJ ONeal
d6a7dfc1a5 add ability to do meta redirects
Proper Location redirects are disadvantageous in some situations.
For example, you may want a developer to know that a resource is available
via https, but you don't want an insecure call to the API to succeed.
2015-06-10 05:48:40 +00:00
Zac Bergquist
41e1f1ffa5 Update error strings (start with lowercase letters) 2015-06-07 20:49:17 -04:00
Abiola Ibrahim
c42e60a3d2 Git: fix for data races. 2015-06-07 20:39:24 +01:00
Abiola Ibrahim
c9233d7446 Gzip: Added compression level, extension and path filters. 2015-06-07 01:21:54 +01:00
xenolf
b4780a41d3 Added webhook functionality to the git middleware.
The webhook providers reside behind a small interface which determines if
a provider should run. If a provider should run it delegates
responsibility of the request to the provider.
ghdeploy initial commit

Added webhook functionality to the git middleware.
The webhook providers reside behind a small interface which determines if a provider should run. If a provider should run it delegates responsibility of the request to the provider.

Add tests

Remove old implementation

Fix inconsistency with git interval pulling.

Remove '\n' from logging statements and put the initial pull into a startup function
2015-06-04 03:24:16 +02:00
Matt Holt
6c52368124 tls: Fix format string 2015-06-02 07:42:38 -06:00
Matthew Holt
c78eb50eb8 tls: Client authentication 2015-06-01 23:22:11 -06:00
Austin
2d6ff40649 add supported for ws in reverse proxy 2015-05-29 19:21:50 -07:00
Abiola Ibrahim
2013838bfd Git: mock time functions in tests. 2015-05-28 10:20:26 +01:00
Abiola Ibrahim
879558b9ee Git: code refactor. replace Sleep with Ticker 2015-05-26 20:20:57 +01:00
Abiola Ibrahim
6c6e0e3f73 Git: More tests. Code refactor. 2015-05-26 04:44:47 +01:00
Matthew Holt
6f05794bb8 git: Fixed unusual but potent race condition 2015-05-25 15:39:04 -06:00
Guilherme Rezende
69939108e1 removed tls cache option 2015-05-25 14:42:09 -03:00
Matthew Holt
674f454e70 t.Fatal -> t.Fatalf 2015-05-25 08:27:54 -06:00
Zac Bergquist
e4b50aa814 Fix more lint warnings 2015-05-24 22:52:34 -04:00
Matt Holt
cc958947e5 Merge pull request #83 from abiosoft/master
Git: Minor fixes. Refactor. Added tests.
2015-05-22 17:13:29 -06:00
Abiola Ibrahim
f44cd5d740 Git: Minor fixes. Refactor. Added tests. 2015-05-22 20:50:04 +01:00
Matthew Holt
3420bd6e06 Another test case for parser 2015-05-21 23:50:37 -06:00
Matthew Holt
b10d846019 More parser tests 2015-05-21 23:36:17 -06:00
Matthew Holt
11ddb5c6ca Tests for the parser 2015-05-21 18:46:42 -06:00
Matthew Holt
b37fed4cc8 Beginning some tests for the parser 2015-05-21 16:31:01 -06:00
Matthew Holt
5397eef234 Added tests for allTokens 2015-05-21 15:42:49 -06:00
Matthew Holt
d6df615588 tls: Mainstream compatibility improvements, better security rating 2015-05-21 10:37:39 -06:00
Matthew Holt
ee754b4a47 Bug fixes 2015-05-21 00:40:05 -06:00
Matthew Holt
5f72b7438a Created app package, and better TLS compatibility with HTTP/2 2015-05-21 00:06:53 -06:00
Matthew Holt
5e8491cf7f Allow IPv6 address without port (fixes #80) 2015-05-20 20:15:39 -06:00
Guilherme Rezende
b378316103 replace c.ArgErr with c.Err in tls when is the case 2015-05-18 23:27:35 -03:00
Guilherme Rezende
a94c7dd788 change tls ssl3 protocol key and tests 2015-05-18 18:15:41 -03:00
Guilherme Rezende
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
Abiola Ibrahim
74d162f377 Rewrite: Support for Regular Expressions. 2015-05-16 13:03:48 +01:00
Abiola Ibrahim
ad7b453f03 Rewrite: modified syntax. 2015-05-15 18:47:26 +01:00
Abiola Ibrahim
b2afc30d12 Rewrite: added regexp. awaiting documentation and tests. 2015-05-15 02:43:29 +01:00
Matt Holt
e2273ea676 Merge pull request #69 from peterhellberg/headers_test
headers: Initial test for Headers and change of Rule.Url to Rule.Path
2015-05-10 07:49:11 -06:00
Peter Hellberg
37b1a81fc7 headers: Corrected copy paste (BasicAuth->Headers) 2015-05-10 07:44:43 +02:00
Matthew Holt
4272536518 markdown: sitegen keyword and run generation at startup
Also fixed bug for markdown files that don't contain front matter
2015-05-09 21:12:52 -06:00
Peter Hellberg
0d5a8a7383 headers: Test for Headers and headersParse funcs 2015-05-09 23:10:18 +02:00
Peter Hellberg
df6efe5d88 headers: Replaced usage of Url to Path in setup 2015-05-09 21:57:55 +02:00
Abiola Ibrahim
978aef2ae7 Merge remote-tracking branch 'upstream/master' 2015-05-08 23:51:09 +01:00
Matthew Holt
2501691ea4 lexer: Fixed backslashes in quoted strings (closes #65) 2015-05-08 10:32:57 -06:00
Abiola Ibrahim
2c7de8f328 Merge remote-tracking branch 'upstream/master' 2015-05-08 06:52:14 +01:00
Matt Holt
557410ffd7 Merge pull request #58 from mschoebel/internal_middleware
Adding "internal" middleware
2015-05-07 13:28:09 -06:00
Matthew Holt
40105094e7 Some tests and utilities for setup functions 2015-05-07 13:11:03 -06:00
Matthew Holt
0dba8d406b NextBlock() doesn't enter an empty block 2015-05-07 13:10:00 -06:00