Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix buffer issue when response buffering is active and a short results #1619

Merged

Conversation

stephanr
Copy link
Member

While working on #1618 I found this issue, that when response buffering is active, a single record CSV output was suppressed.

This was boiling down to the point that a Writer was created in HttpResponseBuffer but not flushed when flushBuffer() is called like it is done for the xmlWriter.

To work around the issue of a possible closed writer instead of flush(), which raises an exception on an already closed stream, the checkError() was used which only flushes if the writer is still open (see [1]).

References:

  1. https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/PrintWriter.html#checkError()

@stephanr stephanr added bug error issue and bug (fix) WFS deegree Web Feature Service core deegree core modules labels Dec 15, 2023
@stephanr stephanr self-assigned this Dec 15, 2023
@tfr42 tfr42 added this to the 3.6 milestone Jan 10, 2024
@tfr42 tfr42 merged commit d710e18 into deegree:main Jan 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error issue and bug (fix) core deegree core modules WFS deegree Web Feature Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants