Skip to content

Conversation

ma2gedev
Copy link
Member

⚠️ 💣 CAUTION: Do not merge! I only checked to pass build, didn't check on product code(I'm in holiday 🌴).

Rough sketch of HttpRequestInfo separation discussed on #4 (comment) .

Change summary is the following:

  • divide interface HttpRequestInfo and MutableHttpRequestInfo, the latter is for mutating headers
  • SpringHttpRequestInfo::trySetHeader receives only acceptable header names, the function should not be accept some headers

Is the design good? Please send me a feedback.

override fun processIncomingHttpRequest(request: HttpRequestInfo): HttpRequestSpan = httpRequestTracer.processRequest(request)

override fun processOutgoingHttpRequest(request: HttpRequestInfo): HttpRequestSpan = httpRequestTracer.processClientRequest(request)
override fun processOutgoingHttpRequest(request: MutableHttpRequestInfo): HttpRequestSpan = httpRequestTracer.processClientRequest(request)
Copy link
Contributor

@saiya saiya Oct 22, 2019

Choose a reason for hiding this comment

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

Advanced recommendation: How about renaming existing HttpRequestInfo to IncomingHttpRequestInfo and also rename MutableHttpRequestInfo to OutgoingHttpRequestInfo ?

And make common super-interface HttpRequestInfo to avoid copy-and-paste (IncomingHttpRequestInfo extends HttpRequestInfo and OutgoingHttpRequestInfo extends HttpRequestInfo).

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, that's nice! 👍

@saiya saiya mentioned this pull request Aug 6, 2020
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.

2 participants