New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to override "User-Agent" header for client-side with application.conf #1492

Closed
apehovski opened this Issue Oct 24, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@apehovski

apehovski commented Oct 24, 2017

Custom value for key "akka.http.client.user-agent-header" currently does not override default value.
As I see, also "akka.http.parsing" values affected.

Minor pull-request:
#1493

@jrudolph

This comment has been minimized.

Show comment
Hide comment
@jrudolph

jrudolph Oct 24, 2017

Member

There's indeed a problem here but I'd say it's a bit different:

  • currently, for pool usages, akka.http.host-connection-pool.client settings override the general client settings but fall back when missing (which is how it should be)
  • however, reference.conf contains a copy of the client settings (which we introduced, I think, to make the reference.conf more readable). That means, however, that akka.http.client settings never apply to the pool because we provide this copy in the reference.conf.

In fact, iirc, this whole setup was only done, to be able to provide a self-contained version of host-connection-pool settings which needs to wrap a set of client settings. Having to create self-contained versions of these settings seems to be a rare case, though.

The solution seems to be, to remove all concrete settings from akka.http.host-connection-pool.client, so that in general you can set settings just in akka.http.client and only have to use akka.http.host-connection-pool.client in special cases.

akka.http.{client,server}.parsing already uses the same style.

Member

jrudolph commented Oct 24, 2017

There's indeed a problem here but I'd say it's a bit different:

  • currently, for pool usages, akka.http.host-connection-pool.client settings override the general client settings but fall back when missing (which is how it should be)
  • however, reference.conf contains a copy of the client settings (which we introduced, I think, to make the reference.conf more readable). That means, however, that akka.http.client settings never apply to the pool because we provide this copy in the reference.conf.

In fact, iirc, this whole setup was only done, to be able to provide a self-contained version of host-connection-pool settings which needs to wrap a set of client settings. Having to create self-contained versions of these settings seems to be a rare case, though.

The solution seems to be, to remove all concrete settings from akka.http.host-connection-pool.client, so that in general you can set settings just in akka.http.client and only have to use akka.http.host-connection-pool.client in special cases.

akka.http.{client,server}.parsing already uses the same style.

@jrudolph jrudolph added this to the 10.0.11 milestone Nov 9, 2017

jrudolph added a commit to jrudolph/akka-http that referenced this issue Nov 28, 2017

=htc akka#1492 remove duplicate settings from akka.http.host-connecti…
…on-pool.client

This way the defaults from akka.http.client automatically apply.

Fixes akka#1492.

jrudolph added a commit that referenced this issue Nov 29, 2017

Merge pull request #1572 from jrudolph/jr/w/1492-fix-connection-pool-…
…settings

=htc #1492 remove duplicate settings from akka.http.host-connection-pool.client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment