argo-cd: Sending HTTP request using PATCH verb to REST API results in connection reset
Checklist:
- I’ve searched in the docs and FAQ for my answer: http://bit.ly/argocd-faq.
- I’ve included steps to reproduce the bug.
- I’ve pasted the output of
argocd version
.
Describe the bug
Sending a HTTP request using the PATCH verb, the connection gets closed unexpected by the API server without any trace why.
To Reproduce
You can use curl to reproduce, below example is against local argocd-server
listening on port 8081 in insecure mode:
$ curl -d '{}' -v -XPATCH http://127.0.0.1:8081/api/v1/session
* Trying 127.0.0.1:8081...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8081 (#0)
> PATCH /api/v1/session HTTP/1.1
> Host: 127.0.0.1:8081
> User-Agent: curl/7.65.3
> Accept: */*
> Content-Length: 2
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 2 out of 2 bytes
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
Expected behavior
Server should send back appropriate error message, such as HTTP 405 - Method not allowed
or even better HTTP 501 - Not implemented
if we don’t support PATCH
verb at all.
Version Build from latest master:
argocd-server: v1.3.0+ac6413c.dirty
BuildDate: 2019-11-09T12:16:35Z
GitCommit: ac6413c63668a8850605c06f235e473e907303f7
GitTreeState: dirty
GoVersion: go1.12.5
Compiler: gc
Platform: linux/amd64
Ksonnet Version: vdev-2019-05-15T19:48:06+0200
Kustomize Version: Version: {KustomizeVersion:3.1.0 GitCommit:95f3303493fdea243ae83b767978092396169baf BuildDate:2019-07-26T18:11:16Z GoOs:linux GoArch:amd64}
Helm Version: v2.13.1
Kubectl Version: v1.15.2
Logs
Paste any relevant application logs here.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 16 (8 by maintainers)
Commits related to this issue
- bug: handle PATCH in http/s server (#2677) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to mmerrill3/argo-cd by mmerrill3 a year ago
- bug: handle PATCH in http/s server (#2677) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to mmerrill3/argo-cd by mmerrill3 a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to argoproj/argo-cd by mmerrill3 a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to argoproj/argo-cd by mmerrill3 a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to argoproj/argo-cd by mmerrill3 a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to argoproj/argo-cd by mmerrill3 a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to argoproj/argo-cd by mmerrill3 a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) (#14731) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> Co-authored-by: Michael Merrill <jjpaacks@gmail.com> — committed to argoproj/argo-cd by gcp-cherry-pick-bot[bot] a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) (#14732) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> Co-authored-by: Michael Merrill <jjpaacks@gmail.com> — committed to argoproj/argo-cd by gcp-cherry-pick-bot[bot] a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) (#14733) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> Co-authored-by: Michael Merrill <jjpaacks@gmail.com> — committed to argoproj/argo-cd by gcp-cherry-pick-bot[bot] a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) (#14734) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> Co-authored-by: Michael Merrill <jjpaacks@gmail.com> — committed to argoproj/argo-cd by gcp-cherry-pick-bot[bot] a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to yyzxw/argo-cd by mmerrill3 a year ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> Signed-off-by: Jimmy Neville <jimmyeneville@gmail.com> — committed to radiusmethod/argo-cd by mmerrill3 a year ago
- feat: Allow 'both' option for uibannerposition (#14623) * fix(ui): Drop ready from Completed container status (#14434) (#14629) Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com>... — committed to argoproj/argo-cd by Jneville0815 8 months ago
- feat: Allow 'both' option for uibannerposition (#14623) * fix(ui): Drop ready from Completed container status (#14434) (#14629) Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com> S... — committed to jmilic1/argo-cd by Jneville0815 8 months ago
- feat: Allow 'both' option for uibannerposition (#14623) * fix(ui): Drop ready from Completed container status (#14434) (#14629) Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com>... — committed to vladfr/argo-cd by Jneville0815 8 months ago
- fix(server): handle PATCH in http/s server (#2677) (#14530) Signed-off-by: mmerrill3 <jjpaacks@gmail.com> — committed to tesla59/argo-cd by mmerrill3 a year ago
- feat: Allow 'both' option for uibannerposition (#14623) * fix(ui): Drop ready from Completed container status (#14434) (#14629) Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com>... — committed to tesla59/argo-cd by Jneville0815 8 months ago
@naimo84 seems that currently it is not resolved and there is not other choice than invoking the cli…
sure, maybe this weekend.
After a little more research, this happens to any verbs apparently unknown to
argocd-server
, so if I use arbitrary ones:Appropriate response from a “good” HTTP server: