Repository: quarkusio/quarkus
Issue: IllegalArgumentException on x-www-form-urlencoded POST with Amazon Lambda HTTP extension

### Describe the bug

I run a small service on Amazon Lambda with HTTP binding and Qute templates. When POSTing form data (application/x-www-form-urlencoded), the request fails if the payload is somehow bigger than the Base64-decoding, called by the LambdaHttpHandler expects and an IllegalArgumentException is thrown.

I figured out, that the String which is passed to the `Base64.decode()` method, contains some line breaks `\\r\\n` and these are causing the error.
If the payload is small enough, so that there are no line-breaks, it works.
If I put a breakpoint on the line and remove the line breaks manually, it also works.

### Expected behavior

Quarkus can parse the request properly without errors, line-breaks in the base64 encoded payload are eliminated automatically and/or yield not in an exception.

### Actual behavior

When posting a form as described above, the following exception is thrown:

```
2021-11-19 16:50:06,111 ERROR [qua.ama.lam.http] (Lambda Thread (DEVELOPMENT)) Request Failure: java.lang.IllegalArgumentException: Illegal base64 character d
	at java.base/java.util.Base64$Decoder.decode0(Base64.java:746)
	at java.base/java.util.Base64$Decoder.decode(Base64.java:538)
	at java.base/java.util.Base64$Decoder.decode(Base64.java:561)
	at io.quarkus.amazon.lambda.http.LambdaHttpHandler.nettyDispatch(LambdaHttpHandler.java:196)
	at io.quarkus.amazon.lambda.http.LambdaHttpHandler.handleRequest(LambdaHttpHandler.java:61)
	at io.quarkus.amazon.lambda.http.LambdaHttpHandler.handleRequest(LambdaHttpHandler.java:41)
	at io.quarkus.amazon.lambda.runtime.AmazonLambdaRecorder$1.processRequest(AmazonLambdaRecorder.java:156)
	at io.quarkus.amazon.lambda.runtime.AbstractLambdaPollLoop$1.run(AbstractLambdaPollLoop.java:124)
	at java.base/java.lang.Thread.run(Thread.java:829)
```

This error occurs since version 2.3.0.Final as some base64 decoding is called, before, until 2.2.3.Final, no base64 decoding is called and it works.

Removing the line breaks in the payload manually, as mentioned in the description above, "fixes" the error.

### How to Reproduce?

I've made a small demo repo for reproducing the issue:
https://github.com/dasniko/quarkus-post-bug

There are two tests, one with a smaller payload which gets a 200 like expected, one with a slightly bigger payload which gets a 500, wich should not occur.

### Output of `uname -a` or `ver`

Darwin Mac-mini.local 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64

### Output of `java -version`

openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7) OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)

### GraalVM version (if different from Java)

n/a

### Quarkus version or git rev

2.4.2

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)

### Additional information

This occors with both lambda bindings `quarkus-amazon-lambda-rest` and `quarkus-amazon-lambda-http`.

Changed files:
extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java
extensions/amazon-lambda-rest/rest-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockRestEventServer.java

diff --git a/extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java b/extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java
index 5130a50ad37..78276861553 100644
--- a/extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java
+++ b/extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java
@@ -69,7 +69,7 @@ public void handleHttpRequests(RoutingContext ctx) {
         if (body != null) {
             String ct = ctx.request().getHeader("content-type");
             if (ct == null || isBinary(ct)) {
-                String encoded = Base64.getMimeEncoder().encodeToString(body.getBytes());
+                String encoded = Base64.getEncoder().encodeToString(body.getBytes());
                 event.setBody(encoded);
                 event.setIsBase64Encoded(true);
             } else {
diff --git a/extensions/amazon-lambda-rest/rest-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockRestEventServer.java b/extensions/amazon-lambda-rest/rest-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockRestEventServer.java
index c8dfbf23c8d..83880ba6a91 100644
--- a/extensions/amazon-lambda-rest/rest-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockRestEventServer.java
+++ b/extensions/amazon-lambda-rest/rest-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockRestEventServer.java
@@ -93,7 +93,7 @@ public void handleHttpRequests(RoutingContext ctx) {
         if (body != null) {
             String ct = ctx.request().getHeader("content-type");
             if (ct == null || isBinary(ct)) {
-                String encoded = Base64.getMimeEncoder().encodeToString(body.getBytes());
+                String encoded = Base64.getEncoder().encodeToString(body.getBytes());
                 event.setBody(encoded);
                 event.setIsBase64Encoded(true);
             } else {