You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#5108 introduced a second attempt at resolving a schema by content with canonical=false if the first attempt with canonical=true fails. however, it doesn't attach the schema as payload to the request, so apicurio responds back with
400
BadRequestException: Empty content is not allowed.
I think the issue is that the second request re-uses the already exhausted ByteArrayInputStream is from the first request, when it should instead have a new ByteArrayInputStream from the original data.
Hello @wolfchimneyrock, thanks for raising this. Yes, that's indeed the problem. The subsequent call was added as part of debugging, and I left it there because I think it's actually helpful, but apparently I messed up with the input stream. I have attached a PR that solves the problem.
Description
Registry
Version: 3.0.0.M5
Persistence type: postgresql
#5108 introduced a second attempt at resolving a schema by content with canonical=false if the first attempt with canonical=true fails. however, it doesn't attach the schema as payload to the request, so apicurio responds back with
I think the issue is that the second request re-uses the already exhausted ByteArrayInputStream
is
from the first request, when it should instead have a new ByteArrayInputStream from the original data.apicurio-registry/schema-resolver/src/main/java/io/apicurio/registry/resolver/DefaultSchemaResolver.java
Lines 273 to 295 in 18061af
The text was updated successfully, but these errors were encountered: