#79 rpkg srpm , should not write content if Server returned status code 404
Closed: Fixed 7 years ago Opened 7 years ago by sergiomb.

As state in https://pagure.io/rpkg/issue/78 if by mistake I use fedpkg srpm instead rfpkg srpm on a package that is not in Fedora repos , etc , we got something like:

Downloading foo.tgz

################################################################## 100.0%

Could not execute srpm: Server returned status code 404

but foo.tgz is written on disk and his content is something like:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /repo/pkgs/rpms/kernel/linux-4.7.tar.xz/5276563eb1f39a048e4a8a887408c031/linux-4.7.tar.xz was not found on this server.</p> (...)

I think we should avoid write false source code files , It will avoid many confusion.
Other note , just in case of http 40x and 50x errors , maybe we should permit other http codes like 30x


At this moment, I think only 200 should be accepted, and the downloaded file containing invalid content should be removed.

@cqi changed the status to Fixed

7 years ago

Login to comment on this ticket.

Metadata