github Azure/azure-sdk-for-go sdk/storage/azblob/v1.8.1

2 hours ago

1.8.1 (2026-09-09)

Breaking Changes

  • DownloadBuffer and DownloadFile now use ETag locking to ensure consistency across parallel chunk requests when the blob size is not specified upfront (i.e., Range.Count is zero). If a blob is modified during a multi-chunk download, subsequent requests will fail with ConditionNotMet instead of silently returning data from mixed blob versions.

Bugs Fixed

  • Fixed CRLF injection vulnerability in Blob Batch subrequest serialization. Header values containing CR or LF characters are now rejected before serialization, preventing header injection in batch requests.
  • Fixed WASM compilation by using heap-allocated buffers on JS targets.
  • Fixed Structured Message CRC64 download validation being skipped when the final payload byte exactly fills the caller's read buffer; the trailing segment footer and message trailer CRC64 are now drained and validated in the same Read.
  • Fixed transient net.Error/io.ErrUnexpectedEOF failures during a Structured Message download not being retried: the decoder now preserves the error chain with %w and the retry reader classifies retryable errors with errors.Is/errors.As.
  • Structured Message download now rejects a response missing the negotiated CRC64 flag instead of silently skipping validation.
  • Fixed the Structured Message encoder emitting a valid, complete message when the source returned a non-EOF error exactly on a segment boundary; such errors are now propagated.
  • Structured Message decoding now rejects a payload that declares fewer segments and appends unvalidated trailing bytes (SMDecode requires the parsed message to consume the entire input, and the streaming decoder validates the consumed byte count against the declared message length).
  • Fixed the Structured Message encoder returning io.EOF when the source ends before the declared content length; a premature EOF is now surfaced as io.ErrUnexpectedEOF so callers do not accept a truncated message.
  • Fixed Structured Message decoder discarding errors (including net.Error and io.EOF) when the returned bytes exactly complete a segment; such errors are now propagated so RetryReader can retry transient failures at segment boundaries.
  • Premature EOF during Structured Message framing reads (header, segment footer, or message trailer) now wraps io.ErrUnexpectedEOF so RetryReader classifies truncated framing as retryable.

Other Changes

  • Optimized DownloadBuffer and DownloadFile to use an initial GET request instead of a HEAD (GetProperties) call for blob size discovery. For small blobs (<=4MB), the entire content is returned in a single request, reducing download latency by ~50%.
  • Updated azcore to v1.23.1.

Don't miss a new azure-sdk-for-go release

NewReleases is sending notifications on new releases.