Commit graph

1146 commits

Author SHA1 Message Date
elotreum
d70d300422 add godoc explaining catch-all parameter matching for ByName 2020-01-20 11:31:45 -07:00
elotreum
e0b50f3ffa add helper method to retrieve RouteParam by name 2020-01-19 20:35:21 -07:00
mrd0ll4r
85d646d1ad
Merge pull request #465 from elotreum/custom-routes
http: allow for customized routes
2020-01-18 11:40:37 +01:00
elotreum
452eb1acef update routes in travis config files 2020-01-16 20:12:21 -07:00
elotreum
9e7323fa44 correct godoc comments to include period 2020-01-16 19:43:50 -07:00
elotreum
77a52f9f30 http: allow for customized routes
Update to allow arrays of routes to be passed to the http frontend.
This also supports named parameters as permitted by the
router.

To avoid external dependencies in the middleware, a RouteParam and
RouteParams type was added to the bittorrent package.

Note: this eliminates the need for "enable_legacy_php_urls", as
the the additional route could be added to the route array. However,
this may be considered a breaking change.
2020-01-14 16:35:28 -07:00
Jimmy Zelinskie
89cdaa8c6d
Merge pull request #464 from elotreum/header-fixes
http: explicitly set Content-Type header
2020-01-14 15:52:46 -05:00
elotreum
5082146ae9 http: explicitly set Content-Type header
Since Content-Type is not explicitly set, golang sniffs the responses
and attempts a guess. With announce responses, this usually means it
guesses application/octet-stream.

According to the godoc at
https://golang.org/pkg/net/http/#ResponseWriter

// If WriteHeader has not yet been called, Write calls
// WriteHeader(http.StatusOK) before writing the data. If the Header
// does not contain a Content-Type line, Write adds a Content-Type set
// to the result of passing the initial 512 bytes of written data to
// DetectContentType. Additionally, if the total size of all written
// data is under a few KB and there are no Flush calls, the
// Content-Length header is added automatically.
2020-01-14 13:31:25 -07:00
mrd0ll4r
053ce531d9
Merge pull request #461 from mrd0ll4r/travis-e2e
travis: add e2e tests with redis storage
2019-10-24 10:14:48 +09:00
Leo Balduf
c8c0de539c travis: get stuff to work 2019-10-18 10:42:57 +09:00
Leo Balduf
9acf809ffb docker: update Dockerfile for Go 1.13+ 2019-10-17 15:00:16 +09:00
Leo Balduf
a9a2d37f11 docs: update redis storage docs 2019-10-17 14:59:59 +09:00
Leo Balduf
728ec0c623 readme: update readme, move example config 2019-10-17 14:59:44 +09:00
Leo Balduf
ae431e1361 travis: refactor into scripts&configs, move to dist/travis 2019-10-17 14:58:24 +09:00
Leo Balduf
ddeb44b527 travis: add e2e tests with redis storage 2019-10-17 13:02:24 +09:00
mrd0ll4r
0a420fe053
Merge pull request #458 from mrd0ll4r/update-travis
travis: update to go 1.13
2019-10-17 13:01:49 +09:00
Leo Balduf
797d0cb6e2 travis: try to go get the latest dependencies 2019-10-17 12:51:53 +09:00
Leo Balduf
0936bd3f9a cmd/chihaya: fix imports for updated goimports 2019-10-17 12:51:53 +09:00
Leo Balduf
f4d34b54e5 travis: update to go 1.13 2019-10-17 12:51:53 +09:00
mrd0ll4r
4d58b4bce6
Merge pull request #459 from mrd0ll4r/frontend-defaults
Frontend defaults
2019-10-17 12:45:42 +09:00
Leo Balduf
87c72bc516 config: update example config 2019-10-17 12:38:08 +09:00
Leo Balduf
cb88a11d6a frontend: add defaults for parser options 2019-10-12 12:52:16 +09:00
mrd0ll4r
eed141dbe4
Merge pull request #454 from onestraw/rmdoc
docs: remove memorybysubnet
Fixes #452
2019-02-19 10:28:43 +03:00
onestraw
acdce7fea9 docs: remove memorybysubnet #452
Change-Id: I6907910e5752e0e0bd47c80f331e76210bbc744e
2019-02-19 14:57:15 +08:00
Jimmy Zelinskie
3889888f8a
Merge pull request #451 from jzelinskie/remove-endorsements
readme: remove endorsements
2019-02-14 17:44:37 -05:00
Jimmy Zelinskie
7b64e92ee9 readme: remove endorsements
We never got format approval for anything here, so I think we'd all feel
more comfortable not including it.
2019-02-14 15:04:33 -05:00
Jimmy Zelinskie
a48ab487e2
Merge pull request #450 from cooperlees/master
Remove Facebook from README.md
2019-02-14 15:03:34 -05:00
Cooper Ry Lees
d7cfcacbff Remove Facebook from README.md
- We no longer use the code that is on HEAD
- We should not incorrectly state that we do and mislead the general public
2019-02-14 09:25:13 -08:00
Jimmy Zelinskie
68b8edfdd5
Merge pull request #449 from jzelinskie/rm-memorybysubnet
storage: remove memorybysubnet
2019-02-14 11:10:11 -05:00
Jimmy Zelinskie
3e334b9536 storage: remove memorybysubnet
This code, while interesting, was only relevant to Facebook and they use
their own fork that they maintain. There was not enough outside
interest to warrant maintaining. I'd rather us use the effort to support
a redis storage backend instead.
2019-02-13 19:44:04 -05:00
Jimmy Zelinskie
94696c062e
Merge pull request #406 from chihaya/readme-refresh
readme refresh & add doc for architecture
2019-02-13 17:09:28 -05:00
Jimmy Zelinskie
a6df644597
Merge pull request #448 from jzelinskie/go-modules
vendor: move to Go modules for dependencies
2019-02-13 17:08:55 -05:00
Jimmy Zelinskie
6e362c184c docs: refactor architecture into its own doc 2019-02-13 10:53:26 -05:00
Jimmy Zelinskie
dc753b937c vendor: move to Go modules for dependencies
Fixes #444.
2019-02-12 20:36:25 -05:00
Jimmy Zelinskie
7df0145118 readme: refresh info, add graphviz architecture 2019-02-12 19:29:55 -05:00
Jimmy Zelinskie
ad1eee4eb7
Merge pull request #433 from onestraw/redis
Redis Storage
2019-02-12 17:20:19 -05:00
onestraw
36e0204a8f Clarification of Redis storage HA
Change-Id: I6674421d3afdbfab6acd97851cb062341b88a90e
2019-02-01 11:14:51 +08:00
onestraw
e83f68b952 storage/redis: add exiting info
Change-Id: I7876bf420a35b48314d14925f5f2ae591fa2d243
2019-01-28 15:18:21 +08:00
onestraw
7943288678 Add storage redis configuration example
Change-Id: I908c69d50fab0963f508f3688ec5934a25aa0550
2019-01-22 19:36:27 +08:00
onestraw
9d22b67f74 storage/redis: use redis reply
Change-Id: If6e6c2545b12c249413d3d13ea41e127b8d1d9b0
2019-01-21 19:44:33 +08:00
onestraw
fa19ffd050 add @mrd0ll4r 's comments
Change-Id: I53616703394f889fa2d0a4e952ac857d99c85218
2019-01-20 17:02:05 +08:00
onestraw
f2ab706f10 fix hlen/hdel race condition
Change-Id: Ib82e6e9f0c66d2df80d68fd00e0c6ec6b46a037b
2019-01-16 19:09:39 +08:00
mrd0ll4r
5f99a7e778
Merge pull request #442 from cenkalti/split-http
split listen&serve for http
2019-01-13 20:07:11 +03:00
onestraw
9a5fac67ed dep ensure udpate
Change-Id: Icb2627d7e6e8fb916b481ed9d9a47daa40330698
2019-01-04 13:58:20 +08:00
onestraw
d65ab677e7 storage/redis: refactor redis storage
- Based on @duyanghao's PR
  - Make staticcheck pass
  - Address review commentsq
2019-01-04 13:58:20 +08:00
duyanghao
e78892d5ac Add Support for Redis Storage Backend(To Achieve Chihaya High Availability)
Change-Id: I5cf703095d1060ac17e403b86056d3eccad97f2c
Signed-off-by: duyanghao <1294057873@qq.com>
2019-01-03 17:21:13 +08:00
Cenk Alti
d0fc3a4634
split listen&serve for http 2018-12-30 13:36:32 +03:00
Jimmy Zelinskie
b4b257c151
Merge pull request #441 from cenkalti/race
enable -race flag in tests
2018-12-29 22:29:36 -05:00
Cenk Alti
df4eeb840b
enable -race flag in tests 2018-12-30 00:50:54 +03:00
Jimmy Zelinskie
91715229f1
Merge pull request #438 from cenkalti/fix-437
Fix 437
2018-12-29 15:03:05 -05:00