Skip to content

HttpRequest.newBuilder() does not preserve executionContext #6349

Closed
@varahash

Description

@varahash

Version

4.1.0

Summary

The HttpRequest.newBuilder() is a convenient function for creating copy of HttpRequest to modify it, as an user I expect that it copies all data from original request. But unfortunately it does so for all fields except executionContext field.
The problem with this is when you have a chain of HttpInterceptor's and each depends on executionContext you must make sure that all interceptors in the chain also uses HttpRequest.Builder.addExecutionContext() to avoid bugs with missing executionContext.

Please consider copying executionContext field in HttpRequest.newBuilder() by default, as it done with other fields.

Steps to reproduce the behavior

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions