Fix: handle unhandled exceptions#454
Closed
some-helper wants to merge 2 commits intopocoproject:developfrom
Closed
Fix: handle unhandled exceptions#454some-helper wants to merge 2 commits intopocoproject:developfrom
some-helper wants to merge 2 commits intopocoproject:developfrom
Conversation
Member
|
@obiltschnig : is this a valid fix? |
Member
|
I can reproduce the issue but the fix is not right. The real issue is that HTTPResponseStreamBuf does not propagate the failed state from the underlying stream. |
obiltschnig
added a commit
that referenced
this pull request
May 31, 2014
urmas69
pushed a commit
to redmedical/poco
that referenced
this pull request
Jul 22, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi all!
I was working with poco-1.4.6 but I see this bug was also in previous versions.
Stable version of poco-1.4.6 works well on my Ubuntu-12.04_x64-86 but it works wrong on Windows 8.1 x64.
I am using Poco::Net::HTTPSStreamFactory. Sample:
Poco::Net::HTTPSStreamFactory httpsFactory;
std::istream* pIStream = httpsFactory.open( some_url );
This code should download some data and it does it but... with additional extra zero-byte in the end of these data.
After investigation I found that istream's implementation on Linux differs from Windows 8.1 one. Both handle exceptions that can be inside of istream::get(). But in Linux in this case EOF will be returned and in Windows 8.1 we get zero.
So I offer this patch.
Thanks,
Oleg
@obiltschnig @aleks-f