Closed
Description
Description
It appears that the docs for the Debian package registry are not 100% correct.
According to the Publish a Package section, the HTTP response code, in case a package file with the same combination of parameters exists already, is supposed to be 409 Conflict
.
In fact, the API returns 400 Bad Request
(routers/api/packages/debian/debian.go:192).
curl example:
curl --no-progress-meter \
--user <my-user>:<my-token> \
--upload-file /tmp/some-package.deb \
-i \
https://my-gitea-instance/api/packages/owner/debian/pool/distribution/main/upload
HTTP/2 400
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
content-type: text/plain;charset=utf-8
date: Fri, 06 Oct 2023 08:16:12 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
x-frame-options: sameorigin
x-xss-protection: 1; mode=block
content-length: 27
package file already exists
There's nothing relevant in the logs.
Gitea Version
1.20.5
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.34.1
Operating System
Ubuntu 22.04.3 LTS
How are you running Gitea?
Docker image gitea/gitea:latest
Database
PostgreSQL