You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTTP API Gateway request deserialization fails on control characters in header #1188
I run a something on the internet and from time to time I see my rust lambda throwing an error.
Looking into it, it seems that control characters in the header fail during deserialization.
After activating trace logs and looking at the payload of the lambda, the user agent header looks like this:
Is there a supported way to handle or reject such requests in the application without throwing an error?
If you tell me what the expected handling is, I would be willing to provide a PR.
Architecture: CloudFront => HTTP API Gateway => Rust Lambda
Error:
Request payload deserialization into LambdaEvent<T> failed. The handler will not be called. Log at TRACE level to see the payload. error=DeserializeError { inner: Error { path: Path { segments: [Map { key: "headers" }] }, original: Error("invalid value: string \"\\u{13}\\u{14}\\u{15}\\u{16}\\u{17}\\u{18}\", expected lots of things can go wrong with HeaderMap", line: 1, column: 279) } }
Activity