Skip to content

Reject unsuccessful HTTP connected resources - #871

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/connected-http-status-870
Sep 20, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/connected-http-status-870

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Problem

A completed HTTP exchange was treated as a successful connected resource regardless of its status. In the VS Code OSS package, an optional missing vsda.js returned 404 text/plain with body Not found; WebScene evaluated that body as JavaScript and emitted Uncaught SyntaxError: Unexpected identifier 'found'.

Change

  • reject connected script, stylesheet, and other document-owned HTTP resources unless the final response status is 2xx
  • preserve the existing 304 cached-body revalidation path
  • preserve Fetch semantics: 4xx/5xx responses still resolve with status and body
  • evict rejected response cache entries and emit load:http-status-failed
  • add a focused native CTest covering a 404 script, 500 stylesheet, and Fetch of the same 404 body

Closes #870

Validation

  • cmake --build /private/tmp/ws870-native --target webscene_native_engine_tests -j 6
  • ctest --test-dir /private/tmp/ws870-native -R '^webscene_native_connected_http_status$' --output-on-failure
    • 1/1 passed in 0.79 seconds
  • git diff --check

@wieslawsoltes
wieslawsoltes merged commit 4601141 into main Sep 20, 2026
0 of 7 checks passed
@wieslawsoltes
wieslawsoltes deleted the fix/connected-http-status-870 branch September 20, 2026 17:27
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.

Reject unsuccessful HTTP responses for connected resources

1 participant