Skip to content

Commit

Permalink
fix(http): don't wait for content if header content-length is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
QHivert committed May 24, 2024
1 parent 76516bd commit be08681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sope-mime/NGMime/NGMimePartParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -1049,10 +1049,10 @@ - (NSData *)readBody {

pool = [[NSAutoreleasePool alloc] init];

if ((self->contentLength == -1) || (self->contentLength == 0)) {
if (self->contentLength == -1) {
rbody = [self readBodyUnknownLength];
}
else {
else if(self->contentLength > 0){
/* note: this is called only, if self->useContentLength is set ! */
rbody = [self readBodyWithKnownLength:self->contentLength];
}
Expand Down

0 comments on commit be08681

Please sign in to comment.