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

fix: PoC fix for #11781, "connect to apisix failed: missing the port number" #11782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ShaunMaher
Copy link

Description

Fixes #11781

In the event that ngx.var.server_port is a blank string (e.g. client request arrived via unix socket instead of TCP port), httpc:connect is given the listening port from the APISIX config, preventing an error.

I have tried to cover the possible ways that node_port can be defined in the config.

function tab_is_array(t) borrowed from:

local function tab_is_array(t)

Sorry if my Lua code isn't up to your standards, I'm new to Lua and still finding my feet.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change: I'll need help with this
  • I have updated the documentation to reflect this change: I don't think any changes are necessary.
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Nov 26, 2024
@ShaunMaher ShaunMaher changed the title PoC fix for #11781, "connect to apisix failed: missing the port number" fix: PoC fix for #11781, "connect to apisix failed: missing the port number" Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
1 participant