Skip to content

Update Rust crate async-nats to 0.52.0 - #200

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/async-nats-0.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/async-nats-0.x

Conversation

@renovate

@renovate renovate Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Change
async-nats dependencies 0.51.0 → 0.52.0

Release Notes

nats-io/nats.rs (async-nats)

v0.52.0

Overview

This release fixes panics on line breaks in header values. A \r inside a received header value panicked the connection task, so any client allowed to publish on a subject could stop its subscribers' connections. Upgrading is recommended.

It is a minor release because HeaderValue no longer implements From<&str> and From<String>.

Fixed
Breaking changes
  • HeaderValue no longer implements From<&str> and From<String>. It implements TryFrom<&str>, TryFrom<&String> and TryFrom<String> instead, returning ParseHeaderValueError for a value with \r or \n (#​1673). Affected code fails to compile:

    • headers.insert(k, HeaderValue::from(s)) → headers.insert(k, s)
    • HeaderValue::from(s), s.into() → HeaderValue::try_from(s)? to reject line breaks, HeaderValue::from_lossy(s) to replace them
    • T: Into<HeaderValue> → T: IntoHeaderValue
    • let Ok(v) = HeaderValue::try_from(s) → handle ParseHeaderValueError, the error is no longer Infallible

    String and integer values passed straight to insert or append, and str::parse, keep working.

Behaviour changes
  • A string header value with \r or \n gets a space in place of each instead of panicking. This covers HeaderMap::insert and append, PublishMessage::header, message_id and expected_*, service respond(Err(..)) and received messages. To reject such a value, convert it with HeaderValue::try_from first (#​1673).
  • Stream::get_raw_message, get_last_raw_message_by_subject and KV entry without direct get no longer fail on such a header value; they replace the line breaks the same way (#​1673).

Full Changelog: nats-io/nats.rs@async-nats/v0.51.0...async-nats/v0.52.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies This updates dependency files label Nov 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies This updates dependency files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant