Bug 1173176

Summary: API delete nonexisting upload_id returns 200
Product: [Retired] Pulp Reporter: Irina Gulina <igulina>
Component: API/integrationAssignee: pulp-bugs
Status: CLOSED UPSTREAM QA Contact: pulp-qe-list
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: skarmark
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 22:46:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Irina Gulina 2014-12-11 15:37:27 UTC
Description of problem:
API delete nonexisting upload_id returns 200, checked on 2.4.4 and 2.6 for empty and non empty upload_id list


Version-Release number of selected component (if applicable):
>> rpm -qa | grep pulp-server
pulp-server-2.6.0-0.1.alpha.el7.noarch

How reproducible:
always

Steps to Reproduce:
>> curl -k -X GET https://user:pass@localhost/pulp/api/v2/content/uploads/

{"upload_ids": []}


>> curl -i -H \"Accept: application/json\" -X DELETE -k -u user:pass 'https://host/pulp/api/v2/content/uploads/b5467f02-8b59-4100-ad21-443905300ea2/'

curl: (6) Could not resolve host: application; Name or service not known
HTTP/1.1 200 OK
Date: Thu, 11 Dec 2014 15:26:35 GMT
Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Length: 4
Content-Type: application/json

null

____________________________________________________________________________
____________________________________________________________________________

another host: 

>> rpm -qa | grep pulp-server
pulp-server-2.4.4-0.1.beta.el7.noarch

>> curl -k -X GET https://user:pass@localhost/pulp/api/v2/content/uploads/


{"upload_ids": ["01f417c9-e25e-492e-baba-a60967d8882d"]}

>> curl -i -H \"Accept: application/json\" -X DELETE -k -u user:pass 'https://localhost/pulp/api/v2/content/uploads/b5467f02-8b59-4100-ad21-443905300ea2/'

curl: (6) Could not resolve host: application; Name or service not known
HTTP/1.1 200 OK
Date: Thu, 11 Dec 2014 15:33:51 GMT
Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Length: 4
Content-Type: application/json



Expected results:
404 as in docs https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/content/upload.html#delete-an-upload-request

Comment 1 Brian Bouterse 2015-02-28 22:46:23 UTC
Moved to https://pulp.plan.io/issues/636