The MultipartSegment.size attribute is updated by the parser while the segment is parsed, and only final once the segment end was detected. It's name is a bit misleading and developers might assume that the multipart protocol provides the segment size in the segment header. To prevent usage errors, the property should throw an exception if accessed before the segment is actually complete and its size is known. This is a backwards incompatible change, so it should only happen in a major release.
The
MultipartSegment.sizeattribute is updated by the parser while the segment is parsed, and only final once the segment end was detected. It's name is a bit misleading and developers might assume that the multipart protocol provides the segment size in the segment header. To prevent usage errors, the property should throw an exception if accessed before the segment is actually complete and its size is known. This is a backwards incompatible change, so it should only happen in a major release.