2
0
Commit Graph

18 Commits

Author SHA1 Message Date
Gusted
2189daee10 refactor httplib (#18338)
- Remove a lot of unused code(most if not all were introduced in gogs
for webhooks usages).

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-01-19 19:31:39 -05:00
Eng Zer Jun
feb2abec7f refactor: move from io/ioutil to io and os package (#17109)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-09-22 13:38:34 +08:00
Lunny Xiao
7f1c497d5e Add an abstract json layout to make it's easier to change json library (#16528)
* Add an abstract json layout to make it's easier to change json library

* Fix import

* Fix import sequence

* Fix blank lines

* Fix blank lines
2021-07-24 18:03:58 +02:00
zeripath
b641150ae7 Second attempt at preventing zombies (#16326)
* Second attempt at preventing zombies

* Ensure that the pipes are closed in ssh.go
* Ensure that a cancellable context is passed up in cmd/* http requests
* Make cmd.fail return properly so defers are obeyed
* Ensure that something is sent to stdout in case of blocks here

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint 2

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint 3

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fixup

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-07-14 10:43:13 -04:00
Lunny Xiao
6e18967afc fix webhook timeout bug (#15613)
* Also fix the potential problem in httplib
2021-04-25 21:48:12 +03:00
zeripath
0b4a94b47f Migrate to use jsoniter instead of encoding/json (#14841)
* Migrate to use jsoniter

* fix tests

* update gitea.com/go-chi/binding

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
2021-03-01 22:08:10 +01:00
kolaente
7815690b67 Add golangci (#6418) 2019-06-12 15:41:28 -04:00
Antoine GIRARD
e4fb8feb18 Add sensitive headers (#3429)
* Add HeaderWithSensitiveCase methods to respect casing

* Update webhook.go
2018-01-31 00:09:16 +02:00
Sandro Santilli
d75aa71d32 Use GiteaServer as the user agent for http requests (#3404)
Otherwise we're still presenting ourselves as GogsServer...
2018-01-22 22:37:14 +02:00
Lunny Xiao
19b28d7494 Add internal routes for ssh hook comands (#1471)
* add internal routes for ssh hook comands

* fix lint

* add comment on why package named private not internal but the route name is internal

* add comment above package private why package named private not internal but the route name is internal

* remove exp time on internal access

* move routes from /internal to /api/internal

* add comment and defer on UpdatePublicKeyUpdated
2017-04-19 11:45:01 +08:00
Ethan Koenig
f027815046 Fix typos in models/ and modules/ (#1248) 2017-03-15 08:52:01 +08:00
Schwobaland
737d1b2fb5 add ProxyFromEnvironment if none set (#1096) 2017-03-02 08:36:42 +08:00
Lunny Xiao
d976e273ec Golint fixed for modules/httplib 2016-11-25 14:32:09 +08:00
Unknwon
5dff91619c fix insecure tls when trigger task 2015-10-26 09:16:24 -04:00
Unknwon
2745423bd3 add webhook recent deliveries 2015-08-27 23:06:14 +08:00
Unknwon
ce8d4cc80b #634 2014-11-18 15:13:08 -05:00
Unknwon
97a373f5e7 Fix #362, update code with upstream 2014-08-23 21:13:55 +08:00
Unknown
e573855a4f Fix #98, support web hook 2014-05-06 11:50:31 -04:00