ObjFW  Diff

Differences From Artifact [b38762c50f]:

To Artifact [e9e028700b]:


928
929
930
931
932
933
934



935
936
937
938
939
940
941
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944







+
+
+







	if (_atEndOfStream)
		return 0;

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

	if ([_socket isAtEndOfStream])
		@throw [OFTruncatedDataException exception];

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

		if (length > _toRead)
			length = (size_t)_toRead;