Release 1.2
New major release with bug fixes, new features, and Struts 2 support!
We received a lot of support from the community for this release - all contributors are mentioned next to the feature/issue they worked on. Thank you all!
New features
- Support for the Apache Struts framework including an archetype:
aws-serverless-struts2-archetype
. Take a look at the quick start wiki. (#149 thank you, @jogep) - Support for API Gateway's multi-value headers and query string parameters. You can now receive arrays of values in the query string and return multiple cookies! (#198)
- Support for pre-registered binary content types so that the framework doesn't have to test the encoding of requests. You can now call the
addBinaryContentTypes(String... ct)
method on theContainerConfig
object to ensure the specified content types are always treated as binary. By default, theContainerConfig
object registersapplication/octet-stream
,image/jpeg
,image/png
, andimage/gif
as binary (#191 thank you, @billrobertson42) - Override default charset when not specified in a request
Content-Type
. By default, the HTTP specs assumeISO-8859-1
as charset. You can now call thesetDefaultContentCharset()
of theContainerConfig
object to override this (#175) - Updated version of all dependency framework to the latest version (#201):
- Jersey 2.26 -> 2.27
- Spark 2.7.2 -> 2.8.0 (thank you, @jschwartz73)
- Spring 5.0.7.RELEASE -> 5.1.1.RELEASE
- SpringBoot 1.5.9.RELEASE -> 1.5.17.RELEASE
Bug fixes
- Resolved NullPointerException when trying to access non-existent query string parameters in Spark (#168)
- Resolved NullPointerException when trying to access remote address and the event object does not contain the context or identity objects. System now defaults to
127.0.0.1
if the value is not populated in the event (#182) - Fixed
setCharacterEncoding
method in servlet response. It was erroneously setting theContent-Encoding
header. This has now been fixed to append the charset property to theContent-Type
header (#188 thank you, @larmog) - Fixed encoding of request URI for Jersey implementation. The library generated the
ContainerRequest
object using thegetPathInfo()
method from the servlet request, which contained decoded parameters. Changed this to use thegetRequestURI()
method. (#200) - Resolved IllegalArgumentException when processing multipart forms. The exception was thrown by the file path security validation method when applied to the file name on the multi-part form. (#205 thank you, @tjordahl)
Other changes
- Moved archetypes to root of package to prevent build failures when calling maven package in specific archtype (#185 thank you, @norris-shelton)
- Removed need to close the output stream explicitly. The stream is now owned by the
proxyStream
method (#183) - Added integration tests for archetypes and parameterized the dependency versions in the
pom.xml
to make sure we don't publish an archetype out of step again (#178) - Updated Jackson dependency version in all packages and samples to
2.9.7
to addressCVE-2018-7489
(#201)