Bug 961300

Summary: Beaker alternative harness API doesn't accept uploading of empty file
Product: [Retired] Beaker Reporter: Ľuboš Kardoš <lkardos>
Component: lab controllerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: 0.12CC: asaha, dcallagh, jorton, llim, qwan, rglasz, rmancy, xjia
Target Milestone: 0.13   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-25 06:26:53 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 Ľuboš Kardoš 2013-05-09 11:25:46 UTC
Description of problem:
Beaker alternative harness API doesn't accept uploading of empty file

Version-Release number of selected component (if applicable):
0.12.1

How reproducible:
always

Steps to Reproduce:
1. Execute command: curl -v -H "Content-Type: application/octet-stream" -X PUT -d "" $BEAKER_LAB_CONTROLLER_URL/recipes/$RECIPEID/tasks/$TASKID/logs/test.foo
  
Actual results:
Beaker denied uploading of empty file with error 'Missing "Content-Length" header' but Content-Lenght header is present in request.

Request headers:
> PUT /recipes/872097/tasks/12362515/logs/test.foo HTTP/1.1
> User-Agent: curl/7.21.3 (x86_64-redhat-linux-gnu) libcurl/7.21.3 NSS/3.13.1.0 zlib/1.2.5 libidn/1.19 libssh2/1.2.7
> Host: lab-02.rhts.eng.brq.redhat.com:8000
> Accept: */*
> Content-Type: application/octet-stream
> Content-Length: 0

Response:
< HTTP/1.1 400 BAD REQUEST
< Content-Type: text/html
< Content-Length: 140
< Date: Thu, 09 May 2013 11:06:17 GMT
< 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>400 Bad Request</title>
<h1>Bad Request</h1>
Missing "Content-Length" header

Expected results:
Beaker should accept uploading of empty file. It is difference if the log file doesn't exist or if it is empty. XMLRPC beaker API accept uploading of empty file.



Additional info:

Comment 1 Dan Callaghan 2013-05-29 04:06:12 UTC
On Gerrit: http://gerrit.beaker-project.org/1986

Comment 5 Amit Saha 2013-06-25 06:26:53 UTC
Beaker 0.13.1 has been released.