-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 8.0.x: 🔧 Add configuration for xPoweredBy and dateHeader interceptors ♻️ Refactor x-powereb-by handler as an interceptor ⚡ Disable undertow option to add Date response header and replace it with DateHeaderInjector ⚡ Virtual working threads always use heap buffers because they are faster for their operations 🔧 Rename configuration option buffer-pooling to buffers-pooling 🔧 Set default value of direct-buffers configuration option to true 🔧 Fix threads options in standalone default configuration ♻️ Remove unused LOGGER in AuthCookieSetter 🔧 Cookie Authentication is disabled by default ✨ Cookie Authentication now support both JWT and RGT cookies 📝 Update javadoc of RegisterPlugin ✨ jwtAuthenticationMechanism configuration now allow both rolesClaim and fixedRoles (will be merged) ✨ Setps Undertow to use custom ThreadAwareByteBufferPool that delegates to specific implementations based on the thread type to optimize performance given the unique characteristics of virtual threads ✨ Lazy-load request content ✨ Allow to configure the number of carrier threads for virtual threads 🐛 Use UTF_8 in ChannelReader.receiveFullString() 🐛 Use UTF_8 in ChannelReader.receiveFullString() ♻️ ChannelReader uses exchange.getRequestReceiver()
- Loading branch information
Showing
72 changed files
with
902 additions
and
849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,13 @@ | |
*/ | ||
package org.restheart.exchange; | ||
|
||
import io.undertow.server.HttpServerExchange; | ||
import java.io.IOException; | ||
import java.nio.charset.StandardCharsets; | ||
|
||
import org.restheart.utils.ChannelReader; | ||
|
||
import io.undertow.server.HttpServerExchange; | ||
|
||
/** | ||
* | ||
* @author Andrea Di Cesare {@literal <[email protected]>} | ||
|
@@ -35,26 +36,19 @@ protected ByteArrayRequest(HttpServerExchange exchange) { | |
} | ||
|
||
public static ByteArrayRequest init(HttpServerExchange exchange) { | ||
var ret = new ByteArrayRequest(exchange); | ||
|
||
try { | ||
ret.injectContent(); | ||
} catch (IOException ieo) { | ||
ret.setInError(true); | ||
} | ||
|
||
return ret; | ||
return new ByteArrayRequest(exchange); | ||
} | ||
|
||
public static ByteArrayRequest of(HttpServerExchange exchange) { | ||
return of(exchange, ByteArrayRequest.class); | ||
} | ||
|
||
public void injectContent() throws IOException { | ||
@Override | ||
public byte[] parseContent() throws IOException, BadRequestException { | ||
if (wrapped.getRequestContentLength() > 0) { | ||
setContent(ChannelReader.readBytes(wrapped)); | ||
return ChannelReader.readBytes(wrapped); | ||
} else { | ||
setContent(null); | ||
return new byte[0]; | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.