[wp-trac] [WordPress Trac] #63316: [E_WARNING] Undefined array key "host" in wp-includes/canonical.php on line 717
WordPress Trac
noreply at wordpress.org
Thu Jun 12 14:42:33 UTC 2025
#63316: [E_WARNING] Undefined array key "host" in wp-includes/canonical.php on line
717
-------------------------------------------------+-------------------------
Reporter: ArtZ91 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Canonical | Version: 6.8
Severity: normal | Resolution:
Keywords: has-test-info has-patch needs- | Focuses:
testing |
-------------------------------------------------+-------------------------
Comment (by SirLouen):
== More Testing info
It seems that some versions of Curl (over 8.10.x) add automatically a Host
despite you set the header with `Host:` empty explicitely
For this reason an alternative is using another tool like netcat
Create a file called for example `request.txt` like:
{{{
GET / HTTP/1.0
}}}
Note the empty line by the end, this is important depending on the OS you
are testing this.
And then call this like: `nc localhost 8080 < request.txt` (or `ncat` in
Windows, you may need `nmap` tools)
The thing here is that HTTP 1.0 is the key: An Apache server, accepting
1.0 insecure requests, a gift of a server... is the method to trigger
these canonical errors.
@ArtZ91 upgrade that prehistoric server!!!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63316#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list