-
Notifications
You must be signed in to change notification settings - Fork 0
Fix cURL Error 26 (SSE Size Mismatch) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/` including `debug_sizes.php`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/` including extensive size debugging tools. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans, and correctly handle single file inputs. - Updated `LangRopeService` to use the `$size` property for the `Content-Length` header in the API request, overriding the auto-detection which uses `fstat` (returning encrypted size). Casts size to string to satisfy Guzzle requirements. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added reproduction scripts in `tests/reproduction/`. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans, and correctly handle single file inputs. - Updated `LangRopeService` to wrap the content stream in a Guzzle `FnStream` and override the `getSize()` method to return the logical size. This ensures Guzzle calculates the correct `Content-Length` for the multipart request body, preventing `cURL error 26` (EOF fail) caused by `fstat` returning the encrypted size. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added robust reproduction scripts in `tests/reproduction/` including encryption verification and size debugging. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans, and correctly handle single file inputs. - Updated `LangRopeService` to wrap the content stream in a Guzzle `FnStream` and override the `getSize()` method to return the logical size. This ensures Guzzle calculates the correct `Content-Length` for the multipart request body, preventing `cURL error 26` (EOF fail) caused by `fstat` returning the encrypted size. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added robust reproduction scripts in `tests/reproduction/` including encryption verification and size debugging. Co-authored-by: TheSpaceGod <[email protected]>
This commit fixes a bug where uploading files with Server-Side Encryption (SSE) enabled failed due to a size mismatch between the decrypted stream and the physical file size. Changes: - Modified `Source` class to accept an optional `$size` property. - Updated `IndexerJob` to pass the logical (decrypted) file size to the `Source`. - Updated `ScanService` to pass the logical file size to the `Source` during manual scans, and correctly handle single file inputs. - Updated `LangRopeService` to wrap the content stream in a Guzzle `FnStream` and override the `getSize()` method to return the logical size. This ensures Guzzle calculates the correct `Content-Length` for the multipart request body, preventing `cURL error 26` (EOF fail) caused by `fstat` returning the encrypted size. - Added `getAppApiFunctions` to `LangRopeService` to facilitate testing. - Added unit tests in `tests/unit/Service/LangRopeServiceTest.php` to verify the fix. - Added robust reproduction scripts in `tests/reproduction/` including encryption verification and size debugging. Co-authored-by: TheSpaceGod <[email protected]>
Fixes cURL Error 26 (SSE Size Mismatch) in Nextcloud Context Chat.
When SSE is enabled,
fstat()on a file handle returns the encrypted size, while reading the stream returns the decrypted content. This mismatch caused uploads to fail with cURL error 26.This fix explicitly passes the decrypted file size (obtained via
$file->getSize()) to theSourceobject and uses it to set theContent-Lengthheader in the HTTP request, bypassing the incorrect auto-detection.Also includes reproduction scripts and unit tests.
PR created automatically by Jules for task 15094702859884413816 started by @TheSpaceGod