Bug 866359 - API: /consumers/{id}/entitlements returns incorrect data and Content-Type header
API: /consumers/{id}/entitlements returns incorrect data and Content-Type header
Status: CLOSED UPSTREAM
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Adam Price
Katello QA List
: Triaged
Depends On:
Blocks: 872602
  Show dependency treegraph
 
Reported: 2012-10-15 03:51 EDT by Brad P. Crochet
Modified: 2013-09-19 14:13 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 872602 (view as bug list)
Environment:
Last Closed: 2013-09-19 14:13:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brad P. Crochet 2012-10-15 03:51:42 EDT
Description of problem:
Some API calls that are proxied to candlepin return an incorrect Content-Type header that can cause some clients to fail. Best known case is calling /consumers/{id}/entitlements, with no params. When this call results in no entitlements, the Content-Type returned is 'json', instead of the correct 'application/json'. Candlepin itself returns the correct header value when called directly. 

Version-Release number of selected component (if applicable):
katello-1.1.12-14.el6cf.noarch

How reproducible:
Always

Steps to Reproduce:
1. attempt to consume an entitlement calling /consumers/{id}/entitlements with no arguments.
2.
3.
  
Actual results:
Completely empty return, with a Content-Type header value of 'json'

Expected results:
Empty list ('[]') with Content-Type header value of 'application/json'

Additional info:
Comment 2 Tom McKay 2012-10-24 15:12:16 EDT
@adprice since you were messing w/ headers already, here's one to take a look at.
Comment 6 Mike McCune 2013-08-16 14:22:36 EDT
getting rid of 6.0.0 version since that doesn't exist
Comment 7 Mike McCune 2013-09-19 14:13:19 EDT
These bugs have been resolved in upstream projects for a period of months so I'm mass-closing them as CLOSED:UPSTREAM.  If this is a mistake feel free to re-open.

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