Bug 961300 - Beaker alternative harness API doesn't accept uploading of empty file
Summary: Beaker alternative harness API doesn't accept uploading of empty file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: lab controller
Version: 0.12
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: 0.13
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-09 11:25 UTC by Ľuboš Kardoš
Modified: 2018-02-06 00:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-25 06:26:53 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.