Files
Malin 37cf714058 WebP Express CloudHost.es Fix v0.25.9-cloudhost
 Fixed bulk conversion getting stuck on missing files
 Added robust error handling and timeout protection
 Improved JavaScript response parsing
 Added file existence validation
 Fixed missing PHP class imports
 Added comprehensive try-catch error recovery

🔧 Key fixes:
- File existence checks before conversion attempts
- 30-second timeout protection per file
- Graceful handling of 500 errors and JSON parsing issues
- Automatic continuation to next file on failures
- Cache busting for JavaScript updates

🎯 Result: Bulk conversion now completes successfully even with missing files

🚀 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 10:22:32 +02:00

55 lines
1.3 KiB
PHP

<?php
/*
subdir: innocent-request
files:
- filename: 'request-me.txt'
content: 'thank you my dear'
request:
url: 'request-me.txt'
bypass-standard-error-handling: 'all'
interpretation:
- ['success', 'status-code', 'equals', '200']
- ['inconclusive', 'status-code', 'equals', '403']
- ['inconclusive', 'status-code', 'equals', '404']
- ['failure']
----
Tested:
Server setup | Test result
--------------------------------------------------
access denied | inconclusive (it might be allowed to other files)
always fatal | failure
*/
namespace HtaccessCapabilityTester\Tests\Testers;
use HtaccessCapabilityTester\HttpResponse;
use HtaccessCapabilityTester\Testers\InnocentRequestTester;
use HtaccessCapabilityTester\Tests\FakeServer;
use PHPUnit\Framework\TestCase;
class InnocentRequestTesterTest extends BasisTestCase
{
public function testAccessAllDenied()
{
$fakeServer = new FakeServer();
$fakeServer->denyAllAccess();
$testResult = $fakeServer->runTester(new InnocentRequestTester());
$this->assertInconclusive($testResult);
}
public function testSuccess()
{
$fakeServer = new FakeServer();
$testResult = $fakeServer->runTester(new InnocentRequestTester());
$this->assertSuccess($testResult);
}
}