ObjFW  Check-in [3ef01bd2d5]

Overview
Comment:Fix -[OFHTTPClientResponse isAtEndOfStream]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3ef01bd2d53f09d1caf94ae87253b757523b27c80505649846f20f68e0f3437e
User & Date: js on 2024-03-04 00:43:17
Other Links: manifest | tags
Context
2024-03-04
01:07
Fix -[OFGZIPStream isAtEndOfStream] check-in: 96f3ab8477 user: js tags: trunk
00:43
Fix -[OFHTTPClientResponse isAtEndOfStream] check-in: 0d804ed391 user: js tags: 1.0
00:43
Fix -[OFHTTPClientResponse isAtEndOfStream] check-in: 3ef01bd2d5 user: js tags: trunk
2024-03-03
23:49
Link ofarc against ObjFWTLS check-in: 7162c635dd user: js tags: trunk
Changes

Modified src/OFHTTPClient.m from [fa2090d82b] to [4bd53b5887].

914
915
916
917
918
919
920



921
922
923
924
925
926
927
928
929
930
931
932
933
}

- (size_t)lowlevelReadIntoBuffer: (void *)buffer length: (size_t)length
{
	if (_stream == nil)
		@throw [OFNotOpenException exceptionWithObject: self];




	if (_atEndOfStream)
		return 0;

	if (!_hasContentLength && !_chunked)
		return [_stream readIntoBuffer: buffer length: length];

	if (_stream.atEndOfStream)
		@throw [OFTruncatedDataException exception];

	/* Content-Length */
	if (!_chunked) {
		size_t ret;








>
>
>



<
<
<







914
915
916
917
918
919
920
921
922
923
924
925
926



927
928
929
930
931
932
933
}

- (size_t)lowlevelReadIntoBuffer: (void *)buffer length: (size_t)length
{
	if (_stream == nil)
		@throw [OFNotOpenException exceptionWithObject: self];

	if (!_hasContentLength && !_chunked)
		return [_stream readIntoBuffer: buffer length: length];

	if (_atEndOfStream)
		return 0;




	if (_stream.atEndOfStream)
		@throw [OFTruncatedDataException exception];

	/* Content-Length */
	if (!_chunked) {
		size_t ret;

1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059

		return 0;
	}
}

- (bool)lowlevelIsAtEndOfStream
{
	if (_atEndOfStream)
		return true;

	if (_stream == nil)
		@throw [OFNotOpenException exceptionWithObject: self];

	if (!_hasContentLength && !_chunked)
		return _stream.atEndOfStream;

	return _atEndOfStream;







<
<
<







1043
1044
1045
1046
1047
1048
1049



1050
1051
1052
1053
1054
1055
1056

		return 0;
	}
}

- (bool)lowlevelIsAtEndOfStream
{



	if (_stream == nil)
		@throw [OFNotOpenException exceptionWithObject: self];

	if (!_hasContentLength && !_chunked)
		return _stream.atEndOfStream;

	return _atEndOfStream;