create a secret - doesn't trim content type

Bug #1252873 reported by Steve Heyman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
High
Arvind Tiwari

Bug Description

Found in: dev

Description: Running create secret tests with content type of "text/plain " (note the trailing space) fails with http 400. Same result if you specify the encoding with a trailing space (such as "text/plain; charset=utf-8 ")

Test Case: test_creating_secret_normalize_content_type_text_plain_trailing_space
also test_creating_secret_normalize_content_type_text_plain_space_charset_utf8_trailing_space

Reproduction Steps:

1) create a secret with a content type of 'text/plain ' or 'text/plain; charset=utf-8 '

   POST http://.../v1/{tenant_id}/secrets

Request:
<Secret object>
name = None
algorithm = None
payload_content_type = text/plain <-- there is a trailing space here
payload_content_encoding = None
content_types = None
expiration = None
bit_length = None
payload = testdata
mode = None

Actual Response:
http 400

Expected Response:
http 201 (successful creation)

Steve Heyman (sheyman)
Changed in barbican:
status: New → Confirmed
John Wood (john-wood-w)
Changed in barbican:
importance: Undecided → High
milestone: none → icehouse-3
Changed in barbican:
assignee: nobody → Arvind Tiwari (arvind-tiwari)
Revision history for this message
Arvind Tiwari (arvind-tiwari) wrote :
Changed in barbican:
status: Confirmed → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/70477
Committed: https://git.openstack.org/cgit/stackforge/barbican/commit/?id=3d9136e8374d60bd6bdf1a4d1c583a865fe902b2
Submitter: Jenkins
Branch: master

commit 3d9136e8374d60bd6bdf1a4d1c583a865fe902b2
Author: Arvind Tiwari <email address hidden>
Date: Fri Jan 31 16:52:02 2014 -0700

    fix for - create a secret - doesn't trim content type

     Closes-Bug: #1252873

    Change-Id: I36da22f28c3d69cfa1902d3cc73e2950ea6acbec

Changed in barbican:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.