Pulp_streamer omits api key during on_demand sync

Problem:
I have a number of repositories with API key in URI (https:://site.com/repo/?blah-blah). They have on_demand policy.
I try to install packages to target system. Package manager reports that packages are missing.
I look at /var/log/messages and see following:

2020-01-16T23:44:26.787651+03:00 sap-repos pulp_streamer: pulp.streamer.server:INFO: Trying URL:https:://site.com/repo/update/x86_64/python-solv-0.6.36-2.27.21.1.x86_64.rpm
2020-01-16T23:44:26.793535+03:00 sap-repos pulp_streamer: urllib3.connectionpool:INFO: Starting new HTTPS connection (6): site.com
2020-01-16T23:44:26.886702+03:00 sap-repos pulp_streamer: nectar.downloaders.threaded:INFO: Download failed: Download of hhttps:://site.com/repo/update/x86_64/python-solv-0.6.36-2.27.21.1.x86_64.rpm failed with code 403: Forbidden
2020-01-16T23:44:26.886970+03:00 sap-repos pulp_streamer: pulp.streamer.server:INFO: Download failed [403]: https:://site.com/repo/update/x86_64/python-solv-0.6.36-2.27.21.1.x86_64.rpm
2020-01-16T23:44:26.888429+03:00 sap-repos pulp_streamer: pulp.streamer.server:ERROR: All download attempts failed: /var/lib/pulp/content/units/rpm/09/c6683bc0cb7b8d91ed5e2f5c4260bfde4cdd122d2ced6c28b4ba36933fc5a6/python-solv-0.6.36-2.27.21.1.x86_64.rpm
2020-01-16T23:44:26.889526+03:00 sap-repos pulp_streamer: [-] 127.0.0.1 - - [16/Jan/2020:20:44:26 +0000] "GET /var/lib/pulp/content/units/rpm/09/c6683bc0cb7b8d91ed5e2f5c4260bfde4cdd122d2ced6c28b4ba36933fc5a6/python-solv-0.6.36-2.27.21.1.x86_64.rpm HTTP/1.1" 404 - "-" "ZYpp 16.19.0 (curl 7.60.0) sle-12-x86_64"

Expected outcome:
packages are successfully downloaded because API key(?blah-blah) is added to URI

Foreman and Proxy versions:
pulp-* 2.21.0-1.el7
katello-* 3.14.1-1.el7
foreman-* 1.24.1-1.el7
same with katello 3.13* and foreman 1.23*

Foreman and Proxy plugin versions:

Distribution and version:
Oracle Linux 7-latest
Other relevant data:

@prokhorovva : Does this work with immediate policy?

i tried a small repo with immediate policy:

2020-01-23T18:21:08.268784+03:00 sap-repos pulp: nectar.downloaders.threaded:INFO: Download succeeded: https:://site.com/repo/update/x86_64/python-solv-0.6.36-2.27.21.1.x86_64.rpm?blah-blah

Hello @prokhorovva,

I think this is a pulp gap. I have opened an issue https://pulp.plan.io/issues/6054 to track this.