Skip to content

ContentSourcePublisher throws from request #11363

@gregw

Description

@gregw

Jetty version(s)

Jetty Environment
12

Description

In the spring integration branch we are seeing the following exception:

java.lang.IllegalStateException: channel already completed
	at org.eclipse.jetty.server.internal.HttpChannelState$ChannelRequest.lockedGetHttpChannelState(HttpChannelState.java:809) ~[jetty-server-12.0.6.jar:12.0.6]
	at org.eclipse.jetty.server.internal.HttpChannelState$ChannelRequest.read(HttpChannelState.java:873) ~[jetty-server-12.0.6.jar:12.0.6]
	at org.eclipse.jetty.io.content.ContentSourcePublisher$SubscriptionImpl.process(ContentSourcePublisher.java:114) ~[jetty-io-12.0.6.jar:12.0.6]
	at org.eclipse.jetty.io.content.ContentSourcePublisher$SubscriptionImpl.request(ContentSourcePublisher.java:85) ~[jetty-io-12.0.6.jar:12.0.6]
	at org.reactivestreams.FlowAdapters$ReactiveToFlowSubscription.request(FlowAdapters.java:182) ~[reactive-streams-1.0.4.jar:?]
	at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164) ~[reactor-core-3.6.2.jar:3.6.2]
	at reactor.core.publisher.BaseSubscriber.request(BaseSubscriber.java:214) ~[reactor-core-3.6.2.jar:3.6.2]
	at org.springframework.http.codec.multipart.MultipartParser.requestBuffer(MultipartParser.java:196) ~[spring-web-6.1.4-SNAPSHOT.jar:6.1.4-SNAPSHOT]

However, the reactive specification says that "Calling Subscription.request MUST return normally". So our ContentSourcePublisher is breaking that rule and throwing rather than calling onError

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFor general bugs on Jetty side

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions