Abiola Ibrahim
6f4835f91a
Markdown: Fix "metadata not closed" bug. More tests.
2015-12-03 00:41:12 +01:00
Matt Holt
ef2ca1da3d
Merge pull request #357 from tw4452852/my_md
...
markdown: fix json front matter parse issue when body content is long
2015-11-27 00:07:19 -07:00
Tw
fbc18c5b85
markdown: fix json format parse issue
...
We can't use json meta parser's remaining buffered data as the markdown body
because it may not contain the entire original content.
Now we adopt the way like toml and yaml parser's way to extract the meta content
at first.
Also when spilting the meta data and content body, additional io.Copy is
unnecessary.
Fix issue #355
Signed-off-by: Tw <tw19881113@gmail.com>
2015-11-25 08:32:14 +08:00
Abiola Ibrahim
016344bae7
Rewrite: Use middleware.Replacer for simple rule.
2015-11-24 12:20:39 +01:00
Luit van Drongelen
1fb66d534a
Close proxy's backend request earlier when re-connecting for websocket
2015-11-21 20:03:46 +01:00
Luit van Drongelen
f0b1edaf8c
Fix proxy for websocket with altered Host header
2015-11-21 20:00:44 +01:00
Matthew Holt
b9244cdf2e
templates: Another context fix when host header is missing port
2015-11-17 14:35:18 -07:00
Matthew Holt
1d47e590e5
proxy: Make headers when upstream is created; avoid potential nil ptr deref
2015-11-17 10:18:13 -07:00
Matt Holt
280ba9db85
Merge pull request #345 from tw4452852/my_proxy
...
proxy: make http header block scoped
2015-11-17 08:20:29 -07:00
Tw
a5b117fcdf
proxy: make tests workable when offline
...
Instead of accessing the google website, we setup a local server
for test, then tests will work fine even we are offline.
Fix issue #346
Signed-off-by: Tw <tw19881113@gmail.com>
2015-11-17 15:18:02 +08:00
Tw
f56d2090b6
proxy: make http header block scoped
...
Each proxy block should could specify its own http header
instead of sharing a global one.
Fix issue #341
Signed-off-by: Tw <tw19881113@gmail.com>
2015-11-17 14:07:32 +08:00
Abiola Ibrahim
7949388da8
Proxy: Allow ignored subpaths.
2015-11-16 17:22:06 +01:00
Matthew Holt
dd119e04b1
Fix go vet
2015-11-15 11:06:50 -07:00
Matthew Holt
f7cfe79905
websocket: Simple buildEnv test, and fix for addresses without port
2015-11-15 11:05:26 -07:00
Tatsuhiko Kubo
69662d4d7d
gzip: added Vary: Accept-Encoding to response header.
...
When the downstream is cache server or CDN, it is important.
2015-11-14 06:11:37 +09:00
Matthew Holt
76ec785e87
ext: Fix panic when URL path is empty
2015-11-10 16:04:02 -07:00
Matthew Holt
02213402e8
Unexport internal types; improved markdown summaries
2015-11-09 07:45:37 -07:00
Matthew Holt
171fd34b3c
markdown: Make base path optional, always generate links
...
The base path being optional in the Caddyfile is convenient when you just want the whole site to be markdown-enabled. The other change is to always generate links... this is because an index page for markdown files may not be statically generated, but it should still show links. Commit 09341fc
was a regression, and this fixes it.
2015-11-07 20:24:17 -07:00
Matt Holt
a1481bc29e
Merge pull request #306 from mholt/bug/websocket-races
...
fixed data races in websockets
2015-11-05 17:19:35 -07:00
Matthew Holt
bcea5182c6
Don't truncate process log; more consistent output
2015-11-05 17:01:08 -07:00
buddhamagnet
57f1d3c205
pass golint
...
pass all tests
respond to maintainer comments
reinstate assignment of t
correct typo
correct typo
pass linter some more
2015-11-05 00:40:35 +00:00
Austin
34c369155c
trim possible line terminators from message
2015-11-03 13:37:32 -08:00
Matthew Holt
ad057ab873
Merge branch 'master' into letsencrypt
...
Conflicts:
caddy/parse/parse.go
caddy/parse/parsing.go
config/config.go
config/setup/controller.go
main.go
server/server.go
2015-11-02 20:26:55 -07:00
Matthew Holt
09341fca12
markdown: Don't generate static site or links unless sitegen is enabled
2015-11-02 20:15:42 -07:00
Austin
abc7c6a148
fixed data races in websockets
2015-11-02 14:19:38 -08:00
Abiola Ibrahim
6a32076271
Merge pull request #299 from abiosoft/master
...
Fix for issues #297 and #298
2015-10-31 07:53:17 +01:00
Abiola Ibrahim
dd1c49bde9
Fix for issues #297 and #298
2015-10-31 02:24:37 +01:00
Guilherme Rezende
9d456bba9b
Add argument in new optional block in templates midd to set delimiters
2015-10-29 20:33:01 -02:00
Matthew Holt
d227bec0ff
Move common function into existing file
2015-10-29 10:34:47 -06:00
Matt Holt
a3f0fff734
Merge pull request #296 from Makpoc/last-modified
...
markdown, templates: Add Last-Modified header
2015-10-29 10:31:38 -06:00
Matthew Holt
234783548f
markdown: Enable tables, fenced code, and strikethrough ( closes #294 )
2015-10-29 09:59:32 -06:00
makpoc
5a29107f3b
Add Last-Modified header when serving markdown and templates
2015-10-29 11:06:35 +02:00
Matt Holt
94ff7dc6fb
Merge pull request #287 from Makpoc/parsewincmd
...
Fix windows command parsing
2015-10-27 23:50:21 -06:00
Matthew Holt
cc229aefae
templates: Parse host successfully when port is implicit ( fixes #292 )
2015-10-27 23:20:05 -06:00
Matthew Holt
4ebff9a130
core: Major refactor for graceful restarts; numerous fixes
...
Merged config and app packages into one called caddy. Abstracted away caddy startup functionality making it easier to embed Caddy in any Go application and use it as a library. Graceful restart (should) now ensure child starts properly. Now piping a gob bundle to child process so that the child can match up inherited listeners to server address. Much cleanup still to do.
2015-10-26 13:34:31 -06:00
Makpoc
d1b667fbce
Two quotes next to each other result in one escaped quote; Add Split Example, add/refactor tests for every platform.
2015-10-24 15:33:04 +03:00
makpoc
0d004ccbab
Attempt to fix windows command parsing + add more tests
2015-10-23 20:21:05 +03:00
Matthew Holt
fec491fb12
Removed another test that is Windows-specific
...
We're not trying to test the shlex library; just our wrapper function
2015-10-21 14:15:42 -06:00
Matthew Holt
794d271152
Remove extra tests that were Linux-specific
...
These tests with the backslash seem to assert that shlex (our Unix shell parsing library) is working properly, not our wrapper function (that parses commands for both Windows and non-Windows). These tests break on Windows so I have removed them.
2015-10-21 14:11:30 -06:00
Matthew Holt
29362e45bc
Parse Windows commands differently than Unix commands
...
Stinkin' backslashes
2015-10-21 14:03:33 -06:00
Makpoc
e3ec7394ab
fix go vet error
2015-10-21 02:18:33 +03:00
Makpoc
ddd69d19c0
Add tests for fileserver.go
2015-10-21 02:08:36 +03:00
Makpoc
8ecc366582
Check and return the correct error if Stat method fails (see golang issue #12991 )
2015-10-21 01:25:38 +03:00
makpoc
72a5579d83
Cover the rest of the (not one-liner) functions in context
2015-10-19 13:51:49 +03:00
Matt Holt
3faffdce2d
Merge pull request #274 from Makpoc/context_tests
...
Add context.go tests
2015-10-15 15:29:23 -06:00
Makpoc
d6242e9cac
Apply review comments - change the used domain, remove obsolete function, remove commented tests
2015-10-15 23:09:02 +03:00
makpoc
bd4d9c6fe2
add tests for context.Header,IP,URL,Host,Port,Method,PathMatches
2015-10-15 19:46:23 +03:00
makpoc
3440f5cfbe
add tests for context.Cookie() and context.IP()
2015-10-15 18:26:13 +03:00
Marcelo E. Magallon
d4a14af14d
Simplify websocket ticker shutdown code
...
"A receive from a closed channel returns the zero value immediately"
Close the tickerChan in the calling function, this causes "case <-c" to
unblock immediately, ending the goroutine and stopping the ticker.
2015-10-14 18:48:43 -06:00
Makpoc
f7e3ed13f9
TestInclude 2 should fail. Update test data and fix error checking
2015-10-15 02:21:02 +03:00