Skip to content

Restore selected 0.8.3 APIs and add HTTP response conversion - #326

Merged
FalkWoldmann merged 26 commits into
masterfrom
restore-unapproved-compatibility
Oct 20, 2026
Merged

FalkWoldmann merged 26 commits into
masterfrom
restore-unapproved-compatibility

Conversation

@alexliesenfeld

@alexliesenfeld alexliesenfeld commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Restore selected APIs and configuration behavior from 0.8.3 that changed on master.

  • Restore the request conversion helper.
  • Restore the original HttpMockStateManager and MockServerState names. Keep the concrete manager implementation, with raw state remaining crate-private; direct access to the raw state is an accepted breaking change. The low-level HttpMockServer::new constructor also remains crate-private; use HttpMockServerBuilder.
  • Add HttpMockResponse::to_http_response() as a named conversion to an HTTP response with a byte body. It borrows the original response and returns a Result.
  • Respect application-installed rustls providers, with a ring fallback when none is installed, and preserve the underlying causes in file, method, and certificate panic messages.
  • Preserve the Docker image's /httpmock working directory while keeping the slim Debian runtime and /usr/local/bin/httpmock executable location.

The removal of the empty experimental feature, conversion-error variant renames and removals from #286 (with remaining variants qualified through their error type), RouterError conversion removals from #286, Mock API changes from #285, body-helper cleanup and query_params_map() removal from #246, matcher/backend visibility changes from #312, dependency and HTTP/2 changes from #297, YAML changes from #299, and existing bug fixes remain in place.

@alexliesenfeld alexliesenfeld changed the title Restore 0.8.3 compatibility Restore selected 0.8.3 APIs and configuration behavior Oct 4, 2026
@alexliesenfeld alexliesenfeld changed the title Restore selected 0.8.3 APIs and configuration behavior Restore selected 0.8.3 APIs and add HTTP response conversion Oct 4, 2026
@alexliesenfeld
alexliesenfeld marked this pull request as ready for review October 4, 2026 23:29

@FalkWoldmann FalkWoldmann left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. See the review points below

Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread src/common/data.rs
/// # Ok(())
/// # }
/// ```
pub fn to_http_response(&self) -> Result<http::Response<Bytes>, Error> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns common::data::Error, which users can't name, so they can only ? it into a boxed error or print it. Fine if that's intended, just worth deciding before it becomes public API.

@alexliesenfeld alexliesenfeld Oct 18, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I would leave it like this and revisit it later. I would not expect that this is a breaking change for most users.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, works for me. Since nobody can name it, changing it later won't break anyone. Could we open an issue for it so it doesn't get lost before 1.0?

Comment thread src/server/state/mod.rs Resolved
Comment thread src/common/data.rs Resolved

@FalkWoldmann FalkWoldmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more changelog points, the rest looks good to me

Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread codecov.yml Resolved
@FalkWoldmann
FalkWoldmann merged commit 6c7e98d into master Oct 20, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants