Skip to content

raw file API broken after updating from 1.22.6 to 1.23.0 #33164

Closed
@3XC1T3D

Description

@3XC1T3D

Description

We updated from Gitea 1.22.6 to 1.23.0. When we try to get a raw file from the repository with ref Parameter , we are getting a 404 response.

You can reproduce it on demo site with following commands.

doesnt work:

curl -X 'GET' \
  'https://demo.gitea.com/api/v1/repos/Zettat123/schedule-actions/raw/README.md?ref=main' \
  -H 'accept: application/octet-stream'

works:

curl -X 'GET' \
  'https://demo.gitea.com/api/v1/repos/Zettat123/schedule-actions/raw/main%2FREADME.md' \
  -H 'accept: application/octet-stream'

?ref=main had to be removed, and is instead added as part of the filepath path parameter

the swagger page still lists the ref parameter, which seems to have been replaced by the ref within the filepath parameter

https://demo.gitea.com/api/swagger#/repository/repoGetRawFile

Gitea Version

1.23.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions