Skip to content
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

http-ng: fix HOST header #1264

Merged
merged 1 commit into from
Apr 20, 2021
Merged

http-ng: fix HOST header #1264

merged 1 commit into from
Apr 20, 2021

Conversation

eloycoto
Copy link
Contributor

@eloycoto eloycoto commented Mar 4, 2021

This strips the default port and use the correct host header value when
using http-ng

URL                          Host Header
--------------------------------------------------------------
http://foo.com               foo.com
http://foo.com:80            foo.com
http://foo.com:80/test       foo.com
http://foo.com:8080/test     foo.com:8080
https://foo.com/             foo.com
https://foo.com:8043/        foo.com:8043
https://foo.com:8043/test    foo.com:8043

Fix THREESCALE-2235
Signed-off-by: Eloy Coto eloy.coto@acalustra.com

@eloycoto eloycoto requested a review from a team as a code owner March 4, 2021 12:42
This strips the default port and use the correct host header value when
using http-ng

```
URL                          Host Header
--------------------------------------------------------------
http://foo.com               foo.com
http://foo.com:80            foo.com
http://foo.com:80/test       foo.com
http://foo.com:8080/test     foo.com:8080
https://foo.com/             foo.com
https://foo.com:8043/        foo.com:8043
https://foo.com:8043/test    foo.com:8043
```

Fix THREESCALE-2235
Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>

if len then len = len - 1 end
if port and port ~= default_port then
Copy link
Contributor

Choose a reason for hiding this comment

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

I've seen in the JIRA issue that this strips the port only if it's the default one to fix some issue when using OIDC. However, this is a generic client, doesn't it affect other use cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, not a issue at all.

@eloycoto eloycoto merged commit 67b7049 into 3scale:master Apr 20, 2021
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.

None yet

2 participants