#37992 closed defect (bug) (fixed)
fsockopen hard codes port 443 when http scheme used
| Reported by: | amandato | Owned by: | rmccue |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7.1 |
| Component: | HTTP API | Version: | 4.6.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
The Transport/fsockopen.php library hard codes port 443 when the scheme https is used. This does not allow for a custom port when using the https scheme. e.g. https://example.com:900/ would be converted to https://example.com:443/. Attached patch fixes this by checking if the port is not already specified.
This patch can be applied separately but was discovered while creating the patch for ticket #37991 https://core.trac.wordpress.org/attachment/ticket/37991/. Both tickets should be addressed together as they are related (this one impacts #37991 and #37991 restores expected behavior for https scheme).
Hi @amandato and welcome to Trac.
Thanks for reporting this, In WordPress 4.6 we're using the external package Requests and issues/patches such as these need to be made against that upstream package.
I'll take a look into this and open a PR upstream.