]> source.dussan.org Git - gitea.git/commit
webhook: set Content-Type for application/x-www-form-urlencoded (#8599)
authorViktor Szakats <vszakats@users.noreply.github.com>
Sun, 20 Oct 2019 11:41:24 +0000 (13:41 +0200)
committertechknowlogick <techknowlogick@gitea.io>
Sun, 20 Oct 2019 11:41:24 +0000 (07:41 -0400)
commitbcd96421dd7d06047578787cc0a6764843e2513b
tree14cd3033ac3e3b2b2e6cada20f89de6a1394eeb9
parent3b379691fa2ccade5d536f17b6438cf5f8344fae
webhook: set Content-Type for application/x-www-form-urlencoded (#8599)

This header is missing since switching http client from GiteaServer (`code.gitea.io/gitea/modules/httplib`) to Go-http-client/1.1 (`net.http`). The header [was added by default](https://github.com/go-gitea/gitea/blob/release/v1.8/modules/httplib/httplib.go#L301) by the former, but this is no longer true with `net.http`, so it needs to be done explicitly:

Ref: https://github.com/go-gitea/gitea/issues/7700
models/webhook.go