Skip to content

v0.8

Compare
Choose a tag to compare
@Articus Articus released this 23 Oct 16:00
· 15 commits to master since this release

New features

This update refines handling of problematic requests:

  • custom messages for 400, 401 and 403 HTTP exceptions are now sent as response body, not as reason phrase (reason phrase is not really convenient for long messages and might be reset by some proxies)
  • build-in producers now encode null as any other data (empty response that was generated before might violate response content type encoding rules)
  • library now allows to declare media type and producer for requests with mangled Accept header - text/plain and Articus\PathHandler\Produce\Text are used by default

Migration notes

You do not need to change anything in your current API project unless your API clients rely on reason phrase for 400, 401 and 403 responses. The easiest workaround for this case would be to use old copies of Articus\PathHandler\Exception\BadRequest, Articus\PathHandler\Exception\Forbidden, Articus\PathHandler\Exception\Unauthorized moved to your own namespace.