Commit Graph

3768 Commits

Author SHA1 Message Date
Arjen Poutsma
259bcd60fb Change deprecated MimeType specificity usages
This commit changes all code that uses now deprecated methods in
MimeType and MediaType.

See gh-27580
2021-11-23 11:49:01 +01:00
Arjen Poutsma
6d9136013e Refactor MimeType/MediaType specificity
This commit makes several changes to MimeType and MediaType
related to the topic of specificity.

This commit deprecates the MimeType and MediaType Comparators.
Comparators require a transitive relationship, and the desired order for
these types is not transitive (see #27488).

Instead, this commit introduces two new MimeType methods: isMoreSpecific
and isLessSpecific, both of which return booleans. MediaType overrides
these methods to include the quality factor (q) in the comparison.

All MediaType sorting methods have been deprecated in favor of
MimeTypeUtils::sortBySpecificity.  This sorting method now uses
MimeType::isLessSpecific in combination a bubble sort algorithm (which
does not require a transitive compare function).

Closes gh-27580
2021-11-23 11:49:01 +01:00
Rossen Stoyanchev
fe8d42ff59 Add JdkHttpClientResourceFactory
See gh-23432
2021-11-22 12:20:30 +00:00
Rossen Stoyanchev
b3b50f8f4b Refactoring in the JDK HttpClient support
See gh-23432
2021-11-22 12:20:30 +00:00
Rossen Stoyanchev
dcc7154641 Polishing contribution
See gh-23432
2021-11-22 12:20:30 +00:00
Julien Eyraud
d930617442 JDK HttpClient connector for WebClient
See gh-21014
2021-11-22 12:20:30 +00:00
Arjen Poutsma
9d65ff73f9 Merge branch '5.3.x' 2021-11-19 12:38:06 +01:00
Arjen Poutsma
722ab25f27 Support empty file names in UriUtils::extractFileExtension
Closes gh-27639
2021-11-19 12:37:00 +01:00
Juergen Hoeller
4750a9430c Early removal of 5.x-deprecated code
Closes gh-27686
2021-11-18 09:18:06 +01:00
Juergen Hoeller
b88ed7f4bb Update API version and package references for Jakarta EE 9
Closes gh-27689
See gh-25354
2021-11-17 12:39:23 +01:00
Juergen Hoeller
555807ea9c Update ServletContainerInitializer filename for Jakarta EE 9
Closes gh-27690
See gh-25354
2021-11-17 12:38:58 +01:00
Brian Clozel
f3b83e7ad4 Merge branch '5.3.x' 2021-11-16 15:05:24 +01:00
d4ksn
29572600dc Ensure that references > MAX_REFERENCE_SIZE are not processed
This commit ensures that only HTML references of length <
MAX_REFERENCE_SIZE are considered as potential references. This check is
possible because reference longer than 10 digits are out of bounds for
Integers.

Closes gh-1249
2021-11-16 15:04:08 +01:00
Christoph Dreis
5c972fcc54 Use Charset variants of URLEncoder and URLDecoder methods 2021-11-10 16:12:11 +01:00
SungMin
32af39d6e6 Use 'toString(Charset)' instead of 'toString(String)' for encodings (#27646)
Co-authored-by: 홍성민(SungMin Hong)/Platform Engineering팀/11ST <devmonster@11stcorp.com>
2021-11-10 15:11:33 +01:00
Rossen Stoyanchev
ec947065a9 Merge branch '5.3.x' into main 2021-11-09 10:23:14 +00:00
Rossen Stoyanchev
c6ce65ef56 Polishing contribution
Closes gh-27623
2021-11-09 09:47:02 +00:00
happyWilliam0
b5743966d6 Improve efficiency of UrlPathHelper#getSanitizedPath
See gh-27623
2021-11-09 09:47:02 +00:00
Arjen Poutsma
1eb8c93689 Merge branch '5.3.x' 2021-11-03 15:03:31 +01:00
Arjen Poutsma
0c7e000250 Refactor Contents to DefaultParts
This commit moves the Contents abstraction into DefaultParts

See gh-27613
2021-11-03 15:02:12 +01:00
Arjen Poutsma
a71f0eb267 Merge branch '5.3.x' 2021-11-02 16:21:16 +01:00
Arjen Poutsma
694db2273f Add Part::delete method
This commit introduces the Part::delete method, that deletes its
underlying storage.

Closes gh-27612
2021-11-02 16:15:44 +01:00
Arjen Poutsma
0a9746e820 Merge branch '5.3.x' 2021-10-27 16:37:00 +02:00
Arjen Poutsma
0416168d0e Fix bug in max header calculation in DefaultPartHttpMessageReader
This commit fixes a bug in the DefaultPartHttpMessageReader, in the
check for exceeding the maximum header size. Before this commit, the
entire buffer size was considered, thus triggering an exception even
though the max header limit was not exceeded. After this commit, we only
consider the size up until the end-of-header mark (CRLFCRLF).

Furthermore, this commit increases the default maximum header size to
10k, the same default as Commons File upload.

Closes gh-27612
2021-10-27 16:28:32 +02:00
Arjen Poutsma
0a58419df4 Add immutable MultiValueMap wrapper
This commit introduces UnmodifiableMultiValueMap, an immutable wrapper
around a MultiValueMap, similar to what is returned by
Collections.unmodifiable*.
CollectionUtils::unmodifiableMultiValueMap now returns
UnmodifiableMultiValueMap.

Closes gh-27608
2021-10-26 15:31:34 +02:00
Sam Brannen
a603779f33 Return previous value in UndertowHeadersAdapter's remove() method
Prior to this commit, UndertowHeadersAdapter's remove() method violated
the java.util.Map contract by always returning null.

This commit fixes this by returning the previous list stored under the
specified key, and otherwise returning null if no previous value was
present.

Closes gh-27592
2021-10-22 14:57:12 +02:00
Sam Brannen
59beef71df Merge branch '5.3.x'
# Conflicts:
#	gradle.properties
2021-10-21 12:42:03 +02:00
Sam Brannen
ec3f857bda Polish contribution
See gh-27586
2021-10-21 12:40:10 +02:00
no-brand
b3eb1a2ad7 Improve example in Javadoc for HttpEntity
Closes gh-27586
2021-10-21 12:35:59 +02:00
Arjen Poutsma
9804e75051 Merge branch '5.3.x' 2021-10-19 11:59:53 +02:00
Arjen Poutsma
a248a52575 Revert transitive MediaType comparators
The fix made for gh-27488 resulted in a change of the default order
of codecs. This commit reverts these changes, so that the previous
order is restored.

Closes gh-27573
2021-10-19 11:53:22 +02:00
Arjen Poutsma
2a3c9e403f Revert "Polishing"
This reverts commit bfa01b35df.
2021-10-19 10:16:27 +02:00
Rossen Stoyanchev
b681c6b4bc Merge branch '5.3.x' into main 2021-10-18 17:08:55 +01:00
Rossen Stoyanchev
bad87be306 Fix checkstyle warning
See gh-27569
2021-10-18 17:04:11 +01:00
Rossen Stoyanchev
f01b856064 Merge branch '5.3.x' into main 2021-10-18 16:27:34 +01:00
Smile
4978eeff7f Update Javadoc in DefaultResponseErrorHandler
Closes gh-27569
2021-10-18 16:26:48 +01:00
Sam Brannen
785212d676 Apply "instanceof pattern matching" in spring-web
This commit also applies additional clean-up tasks such as the following.

- final fields
- diamond operator (<>) for anonymous inner classes
- try with resources

This has only been applied to `src/main/java`.
2021-10-17 12:58:25 +02:00
Rossen Stoyanchev
3633b2a24f Merge branch '5.3.x' into main 2021-10-13 21:22:34 +01:00
Rossen Stoyanchev
a178bbe86f DefaultResponseErrorHandler shows full error details
Closes gh-27552
2021-10-13 20:51:34 +01:00
Juergen Hoeller
627fc7612d Merge branch '5.3.x'
# Conflicts:
#	build.gradle
2021-10-13 13:06:44 +02:00
Juergen Hoeller
b1c7f7d127 Polishing 2021-10-13 12:48:47 +02:00
Rossen Stoyanchev
bd85cb8bac Merge branch '5.3.x' into main 2021-10-11 11:20:14 +01:00
Rossen Stoyanchev
e8f6cd10a5 Apply value formatting to resolved exceptions 2021-10-11 11:14:02 +01:00
Juergen Hoeller
56eefe2a13 Merge branch '5.3.x' 2021-10-08 20:42:54 +02:00
Juergen Hoeller
87aaf5049b Polishing 2021-10-08 20:41:51 +02:00
Juergen Hoeller
4b01370f54 UriTemplateRequestEntity overrides equals/hashCode
Closes gh-27531
2021-10-08 20:41:18 +02:00
Rossen Stoyanchev
f14bd50033 Prune empty method adapter classes 2021-10-08 18:20:09 +01:00
Rossen Stoyanchev
e3b48c23dd Remove AsyncRestTemplate and related types 2021-10-08 17:59:53 +01:00
Sam Brannen
2d1e0d5e38 Merge branch '5.3.x' 2021-10-06 12:13:21 +02:00
Sam Brannen
41ae9632d1 Upgrade to Checkstyle 9.0 and spring-javaformat 0.0.29
This commit upgrades the Gradle build to use Checkstyle 9.0 and
spring-javaformat 0.0.29 (which internally uses Checkstyle 8.45.1).

Closes gh-27520
2021-10-06 12:11:19 +02:00