ronething opened a new pull request, #8593:
URL: https://github.com/apache/apisix/pull/8593

   ### Description
   
   <!-- Please include a summary of the change and which issue is fixed. -->
   <!-- Please also include relevant motivation and context. -->
   
   Fixes #7779
   
   For SRV record which has port 0, we will fallback to use the upstream 
protocol's default port. 
   
   i'm not sure what is the tcp protocol's default port, so my test case is 
temporary like below.
   
   `proxy request to 127.0.0.1:nil`
   
   ```
   === TEST 14: SRV (port is 0)
   --- apisix_yaml
   upstreams:
       - service_name: "zero.srv.test.local"
         discovery_type: dns
         type: roundrobin
         id: 1
   --- error_log
   connect() failed
   --- grep_error_log eval
   qr/proxy request to \S+/
   --- grep_error_log_out
   proxy request to 127.0.0.1:nil
   ```
   
   i will modify `scheme_to_port` it if need.
   
   ```
   local scheme_to_port = {
       http = 80,
       https = 443,
       grpc = 80,
       grpcs = 443
   }
   ```
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to