Maybe I just need to return the correct HTTP response code?
<?php $headers = apache_request_headers(); if(isset($headers['X-Nokia-WLAN-Connectivity-Test'])) { http_response_code(204); exit(); } ?> <html><body>WLAN Connectivity Test</body></html>