Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#8816 closed defect (bug) (fixed)

discover_pingback_server_uri optimizations

Reported by: DD32 Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: Optimization Keywords: has-patch commit
Focuses: Cc:


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.

Attachments (1)

8816.diff (1.2 KB) - added by DD32 9 years ago.

Download all attachments as: .zip

Change History (3)

9 years ago

#1 @jacobsantos
9 years ago

  • Keywords has-patch commit added

#2 @ryan
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10579]) discover_pingback_server_uri optimizations. Props DD32. fixes #8816

Note: See TracTickets for help on using tickets.