Skip to content

fix: apply configured request timeout when retrieving uploaded files - #39

Closed
Scottielee33 wants to merge 1 commit into
OpenWebconcept:mainfrom
Scottielee33:fix/remote-file-request-timeout
Closed

Scottielee33 wants to merge 1 commit into
OpenWebconcept:mainfrom
Scottielee33:fix/remote-file-request-timeout

Conversation

@Scottielee33

@Scottielee33 Scottielee33 commented Sep 23, 2026 •

Copy link
Copy Markdown

Problem

Since v1.13.1 uploaded files are retrieved with wp_remote_get() / wp_remote_head() without a timeout argument, so WordPress' default of 5 seconds applies (previously file_get_contents() used PHP's default_socket_timeout, 60s by default).

For larger uploads or slow loopback requests the download times out, encode_base64_from_url() returns '' and an enkelvoudiginformatieobject is created with an empty inhoud. We see this intermittently on the receiving side (Mozard API gateway).

Change

Use the existing client_request_timeout_option() (15–60s, default 15s) for both requests in InformationObject.

wp_remote_get/wp_remote_head default to a 5 second timeout. Larger
uploads or slow loopback requests time out, resulting in an
enkelvoudiginformatieobject with an empty 'inhoud'.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant