File tree Expand file tree Collapse file tree
http-core/src/main/scala/org/apache/pekko/http/impl/model/parser
http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,7 +351,8 @@ private[http] final class UriParser(
351351 // https://tools.ietf.org/html/rfc7540#section-8.1.2.3
352352 def `http2-path-pseudo-header` = rule(
353353 `absolute-path` ~ optional('?' ~ rawQueryString) // origin-form
354- ) // TODO: asterisk-form
354+ | '*' ~ run(setPath(Path .Empty )) ~ run { _rawQueryString = None } // asterisk-form (for OPTIONS requests)
355+ )
355356
356357 /**
357358 * @return path and percent-encoded query string. When in in 'relaxed' mode, characters not permitted by https://tools.ietf.org/html/rfc3986#section-3.4
Original file line number Diff line number Diff line change @@ -456,14 +456,15 @@ class RequestParsingSpec extends PekkoSpecWithMaterializer with Inside with Insp
456456 // ... A request in asterisk form includes the
457457 // value '*' for the ":path" pseudo-header field.
458458
459- " handle a ':path' with an asterisk" in pendingUntilFixed {
459+ " handle a ':path' with an asterisk" in {
460460 val request : HttpRequest = parseExpectOk(
461461 keyValuePairs = Vector (
462462 " :method" -> " OPTIONS" ,
463463 " :scheme" -> " http" ,
464464 " :path" -> " *"
465465 ))
466- request.uri.toString should === (" *" ) // FIXME: Compare in a better way
466+ request.uri.path.toString should === (" " )
467+ request.uri.rawQueryString should === (None )
467468 }
468469
469470 // [The ":path"] pseudo-header field MUST NOT be empty for "http" or "https"
You can’t perform that action at this time.
0 commit comments