Commit Graph

3906 Commits

Author SHA1 Message Date
Sam Brannen
5641584a89 Merge branch '5.3.x' 2022-05-05 16:11:36 +02:00
neals
e22a038725 Remove Log4J initialization from package-info.java
Closes gh-28420
2022-05-05 16:10:59 +02:00
Sam Brannen
365a18c9c2 Polishing 2022-05-03 15:46:07 +02:00
rstoyanchev
2d2726b8f7 Add RequestBody resolver and minor improvements
Support for RequestBody arguments.
List supported arguments on HttpExchange.
Improve null handling.

See gh-28386
2022-05-03 12:42:37 +01:00
rstoyanchev
7797453f28 Refactor resolver tests
Extract NamedValueArgumentResolverTests.
Move form data vs query params tests into HttpRequestValues.

See gh-28386
2022-05-03 12:42:37 +01:00
rstoyanchev
2794553d2e Add resolvers for URI, cookies, and request params
See gh-28386
2022-05-03 12:42:37 +01:00
rstoyanchev
f8ac5985bd Extract base class AbstractNamedValueArgumentResolver
Closes gh-28395
2022-05-03 12:42:37 +01:00
rstoyanchev
d91b840d0e Polishing and refactoring
See gh-28395
2022-05-03 12:42:37 +01:00
Olga Maciaszek-Sharma
38bf0776a1 Add initial RequestHeaderArgumentResolver implementation and tests. 2022-05-03 12:42:37 +01:00
Arjen Poutsma
efafccde2b Polish contribution & Support multiple quoted printable segments in Content-Disposition
This commit polishes the contribution for support of multiple
base64 segments, and adds supports for multiple quoted printable
segments in Content-Disposition.

Closes gh-28236
2022-04-29 12:38:42 +02:00
Alex Lei
195b622411 Support multiple base64 segments in Content-Disposition
See gh-28236
2022-04-29 12:36:42 +02:00
Arjen Poutsma
217117ced0 Remove Jakarta Mail dependency from spring-web
This commit removes the dependency that the spring-web module has on
Jakarta Mail.

In FormHttpMessageConverter, a dependency on
jakarta.mail.internet.MimeUtility was replaced by existing encoding
logic in ContentDisposition.

In StandardMultipartHttpServletRequest, a dependency on the same
MimeUtility was replaced by new quoted-printable decoding logic in
ContentDisposition.

Closes gh-28392
2022-04-28 15:39:52 +02:00
rstoyanchev
b4e6014a14 Merge branch '5.3.x' into main 2022-04-28 11:40:11 +01:00
rstoyanchev
f0d149b330 Polishing contribution
Closes gh-27830
2022-04-28 11:26:50 +01:00
binchoo
caaf83b8e6 Add tests for binding to a Part field
See gh-27830
2022-04-28 10:45:09 +01:00
rstoyanchev
62ab360f64 Update HttpMethodArgumentResolver
Boolean return value indicates if the value was resolved or not.

See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
b1384ddafa Add HttpServiceProxyFactory builder
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
8a46e96875 Add remaining HttpExchange annotations
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
d7ab5b4132 Refactor HttpRequestSpec to HttpRequestValues
HttpRequestValues is immutable and exposes a builder.

See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
564f8ba7a0 Update after review
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
bb44c0e13a Polishing
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
4bddbd30c4 Polishing contribution
See gh-28386
2022-04-27 21:21:43 +01:00
Olga Maciaszek-Sharma
c2a008fc22 Add HttpMethod and PathVariable argument resolvers
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
c418768f05 Add @HttpRequest and HttpServiceProxyFactory
See gh-28386
2022-04-27 21:21:43 +01:00
Stephane Nicoll
ccb66247ce Merge branch '5.3.x' 2022-04-24 10:05:35 +02:00
izeye
fcf64798b5 Add Javadoc since for GraphQL constants
See gh-28369
2022-04-24 09:58:50 +02:00
Arjen Poutsma
be7fa3aaa8 Introduce PartEvent
This commit introduces the PartEvent API. PartEvents are either
- FormPartEvents, representing a form field, or
- FilePartEvents, representing a file upload.

The PartEventHttpMessageReader is a HttpMessageReader that splits
multipart data into a stream of PartEvents. Form fields generate one
FormPartEvent; file uploads produce at least one FilePartEvent. The last
element that makes up a particular part will have isLast set to true.

The PartEventHttpMessageWriter is a HttpMessageWriter that writes a
Publisher<PartEvent> to a outgoing HTTP message. This writer is
particularly useful for relaying a multipart request on the server.

Closes gh-28006
2022-04-20 11:00:07 +02:00
Sam Brannen
1574fed90b Merge branch '5.3.x' 2022-04-13 10:08:31 +02:00
Sam Brannen
a7cf19cec5 Improve documentation and matching algorithm in data binders 2022-04-13 09:55:40 +02:00
Juergen Hoeller
8744952424 Merge branch '5.3.x' 2022-04-13 00:28:22 +02:00
Juergen Hoeller
0cf7f7bd89 Polishing 2022-04-13 00:24:23 +02:00
Arjen Poutsma
6e9a662290 Merge branch '5.3.x' 2022-04-12 16:52:49 +02:00
Arjen Poutsma
3b4ae7b028 TomcatHttpHandlerAdapter continues after 0 bytes
This commit makes sure that TomcatServerHttpRequest::readFromInputStream
follows the same contract as the method it overrides, and returns
AbstractListenerReadPublisher.EMPTY_BUFFER when 0 bytes are read.

See gh-28241
2022-04-12 16:52:13 +02:00
Stephane Nicoll
ab7213c823 Merge branch '5.3.x' 2022-04-12 16:14:05 +02:00
Stephane Nicoll
8b39698553 Upgrade to Reactor 2020.0.18
Closes gh-28329
2022-04-12 15:53:10 +02:00
Arjen Poutsma
5fc8a9839c Do not add Accept-Ranges header on client-side
This commit fixes a regression that added the Accept-Ranges header on
both client and server. Accept-Ranges is response header, so we now make
sure it only appears on the server side.

See gh-28291
2022-04-12 10:36:49 +02:00
Juergen Hoeller
9ae35e78b1 Merge branch '5.3.x'
# Conflicts:
#	spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/ValidatorFactoryTests.java
#	spring-context/src/test/java/org/springframework/validation/beanvalidation/ValidatorFactoryTests.java
#	spring-web/src/main/java/org/springframework/http/server/reactive/ServletServerHttpRequest.java
2022-04-08 14:42:12 +02:00
Juergen Hoeller
10e979e58b Polishing 2022-04-08 14:37:41 +02:00
Juergen Hoeller
7e1782ea22 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-core/src/main/java/org/springframework/core/convert/Property.java
2022-04-08 13:10:34 +02:00
Juergen Hoeller
4143b445d6 Polishing 2022-04-08 13:04:14 +02:00
Juergen Hoeller
eefdd2c768 Avoid return value reference in potentially cached MethodParameter instance
Closes gh-28232
2022-04-08 13:03:13 +02:00
Juergen Hoeller
c3fe112fd7 Consistent use of getLocalAddr() without DNS lookups in request adapters
Closes gh-28280
2022-04-08 13:00:50 +02:00
Arjen Poutsma
9adfa5e8b0 Add HEAD support in MVC/WebFlux Resource handling
This commit introduces explicit HEAD support in Spring
MVC's ResourceHttpRequestHandler and WebFlux's ResourceWebHandler,
adding just headers but no body.

Closes gh-28291
2022-04-07 13:51:21 +02:00
Arjen Poutsma
192f2becf6 Automatically clean up multipart temp files
This commit ensures that any resources created for multipart handling,
obtained via ServerWebExchange.getMultipartData(), are automatically
deleted after handling the completing the response.

Resource for parts obtained via BodyExtractors::toMultipartData and
BodyExtractors::toParts are not cleaned automatically, and
should be cleaned via Part::delete.

Closes gh-27633
2022-04-06 17:02:31 +02:00
Brian Clozel
fd1346bf66 Merge branch '5.3.x' 2022-04-01 19:25:11 +02:00
Brian Clozel
17f7a24118 Add application/graphql+json mime and media types
Closes gh-28271
2022-04-01 19:24:55 +02:00
rstoyanchev
aea39fdad3 Merge branch '5.3.x' into main 2022-04-01 17:57:48 +01:00
rstoyanchev
d518a7d8c8 AbstractListenerReadPublisher continues after 0 bytes
If we read 0 bytes, e.g. chunked encoding markup read but not the
actual data within it, don't stop reading since the server may or
may not consider it necessary to call onDataAvailable again.
Instead, we keep on reading, and although isReady likely returns
false on the next iteration, it eliminates ambiguity and ensures
the server will call onDataAvailable when more data arrives.

Closes gh-28241
2022-04-01 17:38:03 +01:00
Sam Brannen
7a1421cb0f Suppress deprecation warnings in tests 2022-03-29 15:04:58 +02:00
Brian Clozel
7161940b53 Merge branch '5.3.x' 2022-03-24 13:44:38 +01:00