Sam Brannen
de33e3b575
Merge branch '5.3.x'
2022-01-29 12:43:18 +01:00
Sam Brannen
dbeae27d3c
Reduce build time by reducing shutdown wait period for Jetty tests
2022-01-29 12:41:39 +01:00
Arjen Poutsma
a9a6b071d9
Merge branch '5.3.x'
2022-01-28 13:45:45 +01:00
Arjen Poutsma
caa13690e8
Support multiple boundary buffers in MultipartParser
...
In a small minority of cases, the multipart boundary can spread across
three incoming buffers.
Prior to this commit, MultipartParser.BodyState only supported two
buffers. If the boundary is spread across three buffers, the first
buffer of the three is sent as a whole, even though it contains the
first bytes of the boundary.
This commit fixes this bug, by enqueuing all prior buffers in a queue,
and emitting the ones that cannot contain boundary bytes.
Closes gh-27939
2022-01-28 13:42:24 +01:00
Sam Brannen
786d80c0bb
Merge branch '5.3.x'
2022-01-27 16:13:55 +01:00
Sam Brannen
6647023151
Document how to register annotated classes in a GenericWebApplicationContext
...
Closes gh-27778
2022-01-27 16:08:16 +01:00
Sam Brannen
e32f94bf8c
Polish GenericWebApplicationContext and AnnotationConfigWebApplicationContext
2022-01-27 16:08:07 +01:00
Sam Brannen
912bb16e44
Merge branch '5.3.x'
2022-01-20 15:54:50 +01:00
shirohoo
7211912057
Polish tests in spring-web
...
This PR polishes trivial things in tests in spring-web.
Closes gh-27958
2022-01-20 15:44:24 +01:00
Juergen Hoeller
50faa29329
Merge branch '5.3.x'
...
# Conflicts:
# build.gradle
2022-01-12 16:38:19 +01:00
Juergen Hoeller
6b3052200a
Skip "data:" lines without content
...
Closes gh-27923
2022-01-12 16:35:42 +01:00
rstoyanchev
d61d0d41a3
Merge branch '5.3.x' into main
2022-01-12 09:02:07 +00:00
rstoyanchev
34cb5df859
Consistent id for ReactorServerHttpRequest
...
Closes gh-27885
2022-01-12 08:55:32 +00:00
rstoyanchev
7665424ea8
Polishing contribution
...
Closes gh-27888
2022-01-12 08:55:32 +00:00
Max Demydenko
f63a106c85
clear() method also clears argument resolver cache
...
See gh-27888
2022-01-12 08:55:32 +00:00
rstoyanchev
caaf48d4ec
Add missing overrides to ServerHttpResponseDecorator
...
Closes gh-27889
2022-01-12 08:55:32 +00:00
rstoyanchev
6643efe0b4
Merge branch '5.3.x' into main
2022-01-11 18:48:49 +00:00
rstoyanchev
e8e7fbba94
Polishing contribution and fix failing test
...
The failing test is for Apache HttpComponents where we cannot apply the
Content-Length together with other headers, and must pass it instead
explicitly to ReactiveEntityProducer when writing at which point it gets
set in the native headers.
Closes gh-27768
2022-01-11 17:07:26 +00:00
sokomishalov
bd1f34e174
Apply adapters to client request headers after committed
...
See gh-27768
2022-01-11 15:30:03 +00:00
Arjen Poutsma
b848acd86d
Merge branch '5.3.x'
2022-01-11 13:44:45 +01:00
Arjen Poutsma
a490723f02
NettyHeadersAdapter::putAll does not overwrite headers
...
Similar to 4078b73cec
, but for the
client-side NettyHeadersAdapter::putAll.
See gh-27887
2022-01-11 13:33:15 +01:00
Sam Brannen
d57bc176f2
Merge branch '5.3.x'
2022-01-10 14:21:25 +01:00
Sam Brannen
df263d01b9
Use idiomatic AssertJ assertions for true, false, and null
2022-01-10 14:15:55 +01:00
Arjen Poutsma
1941ae6696
Merge branch '5.3.x'
2022-01-10 11:01:38 +01:00
Arjen Poutsma
4078b73cec
NettyHeadersAdapter::putAll does not overwrite headers
...
NettyHeadersAdapter::putAll uses HttpHeaders::add, which does not
overwrite existing headers. putAll should use HttpHeaders::set instead,
just like NettyHeadersAdapter::put does.
Closes gh-27887
2022-01-10 10:54:04 +01:00
Sam Brannen
202b7ea47b
Merge branch '5.3.x'
2022-01-04 15:17:05 +01:00
Sam Brannen
c3ce4f0f90
Polish contribution
...
See gh-27823
2022-01-04 15:12:29 +01:00
Marten Deinum
e1200f34e7
Use try-with-resources for AutoClosables where feasible
...
Where unfeasible, this commit adds inline comments to explain why
try-with-resources must not be used in certain scenarios. The purpose
of the comments is to avoid accidental conversion to try-with-resources
at a later date.
Closes gh-27823
2022-01-04 15:12:29 +01:00
Marten Deinum
948f5999c3
Replace use of StringBuffer with StringBuilder
...
With JDK 9, java.util.regex.Matcher received overloaded variants of
appendReplacement() and appendTail() that accept a StringBuilder,
allowing us to replace the use of StringBuffer with StringBuilder.
Closes gh-27822
2022-01-04 13:14:17 +01:00
Marten Deinum
941b6af9ac
Use Collection factory methods when applicable
...
This commit replaces the use of Collections.unmodifiableList/Set/Map
with the corresponding 'of(...)' factory methods introduced in Java 9.
Closes gh-27824
2022-01-04 12:01:13 +01:00
Sam Brannen
6555d3b42d
Suppress warnings in tests
2022-01-03 16:12:14 +01:00
Sam Brannen
97625e3658
Additional changes because HttpMethod changed from enum to class
...
See gh-27697
2022-01-03 16:12:14 +01:00
Stephane Nicoll
900e0f56eb
Polish "Fix typo and use of componentry"
...
See gh-27852
2021-12-29 11:05:27 +01:00
liuzhifei
65d2e9bb54
Fix typo and use of componentry
...
See gh-27852
2021-12-29 11:01:41 +01:00
izeye
713795cc34
Polish
...
See gh-27827
2021-12-21 09:36:08 +01:00
Stephane Nicoll
ac1032ffc9
Polish formatting
...
See gh-27833
2021-12-21 09:34:39 +01:00
izeye
731af9444c
Polish HtmlCharacterEntityDecoder
...
See gh-27833
2021-12-21 09:32:46 +01:00
Stephane Nicoll
1aaf5262b1
Polish formatting
...
See gh-27835
2021-12-21 09:22:03 +01:00
izeye
08a34ca1ec
Polish HttpMethod
...
See gh-27835
2021-12-21 09:20:29 +01:00
Juergen Hoeller
aeff664cf9
Polishing
2021-12-14 09:46:52 +01:00
Juergen Hoeller
ba468a731f
Remove JamonPerformanceMonitorInterceptor support
...
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786
2021-12-14 09:46:08 +01:00
Rossen Stoyanchev
a15393836c
Merge branch '5.3.x' into main
2021-12-09 15:35:21 +00:00
Rossen Stoyanchev
e9083d7d20
Apply LogFormatUtils in more places
2021-12-09 14:53:52 +00:00
Juergen Hoeller
14f24f43d7
Polishing
2021-12-03 22:36:31 +01:00
Rossen Stoyanchev
2d2db530b1
Merge branch '5.3.x' into main
2021-12-02 12:35:48 +00:00
Rossen Stoyanchev
6582787678
Apply resources after application HttpClient mapper
...
Closes gh-27749
2021-12-02 12:28:36 +00:00
ydh6226
a0ba808217
Use HttpHeaders.ALLOW instead of String constant
...
This commit changes "Allow" strings into HttpHeaders.ALLOW.
See gh-27356
2021-12-02 12:28:36 +01:00
Frederick Zhang
baed0785fd
Replace XMLReaderFactory with SAXParserFactory
...
XMLReaderFactory has been marked as deprecated and without additional
configuration, and it's slower than SAXParserFactory.
Previously `XMLReaderFactory.createXMLReader()` is called upon every
request. This is an anti-pattern as mentioned in [1] and it can be very
slow since it loads the jar service file unless a parser has been
pre-assigned [2] (e.g. by setting org.xml.sax.driver).
SAXParserFactory uses a FactoryFinder [3] instead, which takes advantage
of a thread-local cache provided by ServiceLoader. Developers can still
pre-assign a factory by setting javax.xml.parsers.SAXParserFactory to
make it faster.
[1] https://bugs.openjdk.java.net/browse/JDK-6925410
[2] c8add223a1/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderFactory.java (L144-L148)
[3] 66c653c561/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java (L181-L185)
See gh-27239
2021-12-02 11:32:46 +01:00
Arjen Poutsma
445f25c466
Use HttpMethod::valueOf in HttpMethod::resolve
...
This commit makes sure that HttpMethod::resolve uses HttpMethod::valueOf
and returns an HttpMethod for non-standard methods.
See gh-27697
2021-11-30 14:59:42 +01:00
Arjen Poutsma
da3b4cb65d
Polish
2021-11-30 14:09:33 +01:00