Comments (7)
For the record, the exception thrown by Jetty is:
org.eclipse.jetty.http.BadMessageException: 400: Ambiguous URI path separator
at org.eclipse.jetty.server.internal.HttpConnection$HttpStreamOverHTTP1.headerComplete(HttpConnection.java:1186) ~[jetty-server-12.0.6.jar:12.0.6]
at org.eclipse.jetty.server.internal.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:952) ~[jetty-server-12.0.6.jar:12.0.6]
at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1249) ~[jetty-http-12.0.6.jar:12.0.6]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1545) ~[jetty-http-12.0.6.jar:12.0.6]
at org.eclipse.jetty.server.internal.HttpConnection.parseRequestBuffer(HttpConnection.java:567) ~[jetty-server-12.0.6.jar:12.0.6]
at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:390) ~[jetty-server-12.0.6.jar:12.0.6]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322) ~[jetty-io-12.0.6.jar:12.0.6]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99) ~[jetty-io-12.0.6.jar:12.0.6]
at org.eclipse.jetty.io.ssl.SslConnection$SslEndPoint.onFillable(SslConnection.java:574) ~[jetty-io-12.0.6.jar:12.0.6]
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:390) ~[jetty-io-12.0.6.jar:12.0.6]
at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:150) ~[jetty-io-12.0.6.jar:12.0.6]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99) ~[jetty-io-12.0.6.jar:12.0.6]
at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) ~[jetty-io-12.0.6.jar:12.0.6]
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:478) ~[jetty-util-12.0.6.jar:12.0.6]
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:441) ~[jetty-util-12.0.6.jar:12.0.6]
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293) ~[jetty-util-12.0.6.jar:12.0.6]
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201) ~[jetty-util-12.0.6.jar:12.0.6]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:410) ~[jetty-util-12.0.6.jar:12.0.6]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:971) ~[jetty-util-12.0.6.jar:12.0.6]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1201) ~[jetty-util-12.0.6.jar:12.0.6]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1156) ~[jetty-util-12.0.6.jar:12.0.6]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
from s3mock.
@togise there is an integration test that tests this exact behavior, and it's running just fine:
https://github.com/adobe/S3Mock/blob/main/integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/ErrorResponsesV2IT.kt#L28
Not sure what's wrong in your code, you should look at the S3Mock logs, preferably in debug.
from s3mock.
I should add: the integration tests are executed on every commit, releases are not possible if they do not pass.
from s3mock.
So I tried the key in your test NoSuchKey.json
and it passed, but if I used my key which was /no/file/exists
it failed.
If I use /no/file/exists
, I am not even seeing any logs, I believe it is hanging at the Spring MVC layer I assume, since your app uses Spring.
from s3mock.
found the problem.
Spring Boot 3.2 updated Jetty from 11 to 12.
Jetty 12 enforces paths according to this RFC: https://datatracker.ietf.org/doc/html/rfc3986#section-3.3
When you request a key /test
in a bucket test-bucket
, we receive a request /test-bucket//test
which is not RFC compliant.
S3 however allows keys to be prefixed with a /
.
For now, the behaviour in Jetty is configurable, and I'll release a fix in the next days that will allow you to continue using these keys.
from s3mock.
@togise I just released 3.5.2 fixing this issue.
from s3mock.
updating Spring Boot to 3.2.5 breaks URI handling yet again:
spring-projects/spring-boot#40250
jetty/jetty.project#11495
fixing this in #1785 again...
from s3mock.
Related Issues (20)
- SSLException: Unsupported or unrecognized SSL message HOT 6
- Copying object with new storage class does not appear to save storage class HOT 5
- initialBuckets is ignored if at least one bucket exists with a bucketMetadata.json
- Service: Amazon S3; Status Code: 404; Error Code: 404 HOT 2
- org.eclipse.jetty.server.Request : java.lang.IllegalStateException: Form is larger than max length 200000 HOT 1
- while reading large number of record from s3mock getting Exception( java.io.IOException: Attempted read on closed stream) HOT 2
- S3Mock is incompatible with Spring Boot 3.2.x and Spring Framework 6.x HOT 3
- createBucket fails using S3AsyncClient with NoSuchBucketException HOT 1
- Support S3AsyncClient from software.amazon.awssdk:s3 HOT 2
- Cannot put object acl without a policy HOT 5
- When upgrading to Spring 3.2.2: ClassNotFoundException: javax.xml.bind.annotation.XmlElement HOT 1
- When using async uploads, S3Mock incorrectly stores unsigned, chunked uploads without removing meta (chunk, checksum) information. HOT 14
- When starting S3Mock in Docker, root folder is not accessible from outside of the container HOT 4
- Synchronisation issues HOT 3
- missing namespace xml header. HOT 4
- When using async uploads, S3Mock incorrectly stores unsigned, chunked uploads without removing meta (chunk, checksum) information when the file is >16KB HOT 2
- Validate checksums for uploads and parts
- NumberFormatException when uploading files HOT 5
- Content-MD5 does not match object md5 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s3mock.