pjfanning commented on code in PR #1264:
URL: https://github.com/apache/pekko-http/pull/1264#discussion_r3995967227
##########
http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2ServerSpec.scala:
##########
@@ -657,6 +669,10 @@ class Http2ServerSpec extends Http2SpecWithMaterializer("""
})
"fail if more data is received than stream-level window
allows".inAssertAllStagesStopped(
new WaitingForRequestData {
+ // the single frame below is deliberately bigger than the
stream-level buffer, and so also bigger than the
+ // default max-frame-size; raise that limit so the frame reaches
the flow-control check this test is about
+ override def settings: ServerSettings =
super.settings.mapHttp2Settings(_.withMaxFrameSize(1024 * 1024))
Review Comment:
Good catch, thanks. Rebased onto main and added the same
`withMaxFrameSize(1024 * 1024)` override to that test in 7d5398ef2; both
instances of it pass now. PR body updated too.
##########
http-core/src/main/mima-filters/2.0.x.backwards.excludes/max-frame-size.excludes:
##########
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# new max-frame-size setting
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.settings.Http2ClientSettings.maxFrameSize")
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.settings.Http2ServerSettings.withMaxFrameSize")
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.scaladsl.settings.Http2ClientSettings.maxFrameSize")
+ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.scaladsl.settings.Http2ServerSettings.maxFrameSize")
Review Comment:
Added both, and re-ran `sbt "+http-core/mimaReportBinaryIssues"` — clean on
2.13.18 and 3.3.8. The rebase also pulled in the 1.0.0 comparison from
`mima-1.2.0-additional-checks.excludes`, which flagged five more problems from
this PR (the replaced internal `Http2FrameParsing` constructor, the abstract
`Http2CommonSettings.maxFrameSize`, and three `copy$default$N` shifts from the
new case-class field). Those are filtered in the same file, same shape as the
`maxHeaderListSize` ones.
##########
http-core/src/main/resources/reference.conf:
##########
@@ -254,6 +254,20 @@ pekko.http {
# effective limit for a well-behaved peer is somewhat stricter than the
configured value.
max-header-list-size = 64 KiB
+ # The largest frame payload this endpoint accepts, in bytes. A larger
incoming frame is rejected with a
+ # FRAME_SIZE_ERROR on its frame header, before the payload is buffered,
so this bounds how much a single frame
+ # can make this endpoint hold at once. The length field of a frame
header allows up to 16 MiB - 1.
+ #
+ # This is a limit, not an invitation: no larger SETTINGS_MAX_FRAME_SIZE
is advertised, so a peer that follows
+ # the spec keeps to the 16 KiB default of RFC 9113, section 4.2 and the
extra room here is only leniency for
+ # peers that do not. Advertising a value far above the initial 64 KiB
flow-control window would invite frames
+ # that cannot be received without breaking flow control anyway.
+ #
+ # RFC 9113, section 4.2 constrains this to be between 16 KiB and 16 MiB
- 1. The amount of request data
+ # buffered overall is bounded separately by the
incoming-connection-level-buffer-size and
+ # incoming-stream-level-buffer-size settings above.
Review Comment:
Fixed in both blocks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]