HomePhorge

(#21427) Remove duplicate handling of accept headers
50a76d54b908Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#21427) Remove duplicate handling of accept headers

When the save and destroy actions started respecting the accept header
we duplicated how accept headers were handled for selecting the response
format. This removes that duplication and in putting specific tests in
place, cleans up the tests to work mainly through the public interfaces
as well as putting in place an HTTP error handling mechanism that allows
the request handlers to more specifically control the HTTP responses.
Invalid Accept headers will now cause a 406 response instead of the
previous 400.

Since all of this is tested with the memory terminus, it needed to be
expanded to also handle search and head actions.

Details

Provenance
Andrew Parker <andy@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUff0daf49624b: (#21427) Respect Accept header for destroy
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU50a76d54b908: (#21427) Remove duplicate handling of accept headers (authored by Andrew Parker <andy@puppetlabs.com>).Jun 26 2013, 9:42 PM