Skip to content

Commit

Permalink
Issue #11911 Fix documentation example for Request.getHttpUri (#11916)
Browse files Browse the repository at this point in the history
* Issue #11911 Fix documentation example for Request.getHttpUri
  • Loading branch information
janbartel authored Jun 14, 2024
1 parent d345567 commit 619c539
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpURI;
import org.eclipse.jetty.http.Trailers;
import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.server.Context;
Expand Down Expand Up @@ -60,10 +61,11 @@ public boolean handle(Request request, Response response, Callback callback) thr
// - servletRequest.getProtocol();
String protocol = request.getConnectionMetaData().getProtocol();

// Gets the full request URI.
// Gets the request URL.
// Replaces:
// - servletRequest.getRequestURL();
String fullRequestURI = request.getHttpURI().asString();
HttpURI httpURI = HttpURI.build(request.getHttpURI()).query(null);
StringBuffer requestURL = new StringBuffer(httpURI.asString());

// Gets the request context.
// Replaces:
Expand Down

0 comments on commit 619c539

Please sign in to comment.