Project

Profile

Help

Issue #963

closed

Invalid Content-Encoding HTTP header in REST API

Added by pvandepitte almost 9 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.5
Platform Release:
2.8.7
OS:
CentOS 6
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

Description

When I upload metadata, the V2 REST API returns an invalid Content-Encoding HTTP header: utf-8. Some libraries (e.g. apache commons-httpclient) fail on invalid values for Content-Encoding... Valid content encodings are e.g. gzip, inflate, ... utf-8 is a charset and should be appended to the content-type header

curl -ik --cert /path/to/client.pem -X POST -d @/path/to/metadata.json https://pulp.host/pulp/api/v2/repositories/repo-id/actions/import_upload/
HTTP/1.1 202 Accepted
Date: Thu, 07 May 2015 15:31:06 GMT
Server: Apache/2.2.15 (CentOS)
Content-Encoding: utf-8
Content-Length: 172
Connection: close
Content-Type: application/json

{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/3f9e74d3-fc7a-410d-9ae3-9f679c317289/", "task_id": "3f9e74d3-fc7a-410d-9ae3-9f679c317289"}], "result": null, "error": null}

Also available in: Atom PDF