|Reported by:||DD32||Owned by:||anonymous|
Just some optimizations for discover_pingback_server_uri()
- Just use HTTP/1.0 no need for 1.1, and theres a possibility it'll return contents which the HTTP API isnt designed to handle
- Do a HEAD on documents first and check for the headers, If that fails, THEN do a GET and load the (much heavier) document
- Do not attempt to discover pingback servers for our own uploaded items (Eg, Insert a image into a post, this function will no longer search for a pingback server for that image url now)
Also, I have a feeling that the 2second timeout may be too short for some documents.. DNS+latency can account for nearly 1 second on some slower hosts, I dont see many WP installs (on shared hosting) returning a non-cached page in that time.. Well, some will, most decent hosters will, but on some lower end, or oversold servers, i dont think it'll be enough time to load the entire document as function requires.