···139139 opts.signal = (request as any).signal as AbortSignal | undefined;
140140141141 // When body is FormData, remove Content-Type header to avoid boundary mismatch.
142142- // The Request constructor auto-generates a boundary and sets Content-Type, but
143143- // we pass the original FormData to ofetch which will generate its own boundary.
144144- // If we keep the Request's Content-Type, the boundary in the header won't match
145145- // the boundary in the actual request body sent by ofetch.
142142+ // Note: We already delete Content-Type in resolveOptions for FormData, but the
143143+ // Request constructor (line 175) re-adds it with an auto-generated boundary.
144144+ // Since we pass the original FormData (not the Request's body) to ofetch, and
145145+ // ofetch will generate its own boundary, we must remove the Request's Content-Type
146146+ // to let ofetch set the correct one. Otherwise the boundary in the header won't
147147+ // match the boundary in the actual multipart body sent by ofetch.
146148 if (typeof FormData !== 'undefined' && body instanceof FormData) {
147149 opts.headers.delete('Content-Type');
148150 }