[wp-trac] [WordPress Trac] #64534: Performance results logging script doesn't handle HTTP redirects or non-2xx responses

WordPress Trac noreply at wordpress.org
Wed Jan 21 10:36:27 UTC 2026


#64534: Performance results logging script doesn't handle HTTP redirects or non-2xx
responses
------------------------------+-----------------------------
 Reporter:  youknowriad       |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:  performance       |
------------------------------+-----------------------------
 The tests/performance/log-results.js script, which publishes performance
 test results to CodeVitals is not working anymore. codevitals.run now
 performs a redirect and our code doesn't follow redirects properly.

 No redirect handling: Node's https.request() doesn't automatically follow
 HTTP redirects. If the API returns a 301/302, the script logs the status
 code but doesn't follow the Location header, causing results to be
 silently lost.

 We can replace the https.request() implementation with Node's built-in
 fetch() (available since Node 18), which handles redirects automatically
 and provides cleaner error handling.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64534>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list