Skip to content

Conversation

@eldadfux
Copy link
Member

What does this PR do?

This PR fixes an issue where WebAssembly (.wasm) files were served with the incorrect MIME type (application/octet-stream) instead of application/wasm. This was causing problems for applications (e.g., Flutter Web) that rely on strict MIME type checking in browsers like Chrome.

The change introduces a specific check in the static file serving logic to ensure that files with a .wasm extension are explicitly served with the application/wasm MIME type.

Test Plan

A new E2E test, testStaticFileMimeTypes, has been added to tests/e2e/Services/Sites/SitesCustomServerTest.php. This test:

  1. Deploys a static site containing a test.wasm file and an index.html file.
  2. Makes a request to /test.wasm and asserts that the Content-Type header in the response is application/wasm.
  3. Makes a request to /index.html and asserts that the Content-Type header contains text/html to ensure other file types are unaffected.

A minimal test.wasm file has been added to tests/resources/sites/static/ for testing purposes.

Related PRs and Issues

  • Fixes an issue where .wasm files were served with incorrect MIME type.

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

Open in Cursor Open in Web

Co-authored-by: eldad <eldad@appwrite.io>
@cursor
Copy link

cursor bot commented Nov 23, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 23, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/create-pull-request-with-tests-claude-4.5-sonnet-92fa

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Nov 23, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
binutils 2.44-r2 CVE-2025-5244 HIGH
binutils 2.44-r2 CVE-2025-5245 HIGH
imagemagick 7.1.2.0-r0 CVE-2025-62171 HIGH
imagemagick-c++ 7.1.2.0-r0 CVE-2025-62171 HIGH
imagemagick-dev 7.1.2.0-r0 CVE-2025-62171 HIGH
imagemagick-heic 7.1.2.0-r0 CVE-2025-62171 HIGH
imagemagick-jpeg 7.1.2.0-r0 CVE-2025-62171 HIGH
imagemagick-jxl 7.1.2.0-r0 CVE-2025-62171 HIGH
imagemagick-libs 7.1.2.0-r0 CVE-2025-62171 HIGH
imagemagick-openexr 7.1.2.0-r0 CVE-2025-62171 HIGH
libecpg 17.6-r0 CVE-2025-12818 HIGH
libecpg-dev 17.6-r0 CVE-2025-12818 HIGH
libpq 17.6-r0 CVE-2025-12818 HIGH
libpq-dev 17.6-r0 CVE-2025-12818 HIGH
libxml2 2.13.8-r0 CVE-2025-49794 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49796 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49795 HIGH
libxml2 2.13.8-r0 CVE-2025-6021 HIGH
pcre2 10.43-r1 CVE-2025-58050 CRITICAL
postgresql17-dev 17.6-r0 CVE-2025-12818 HIGH
github.com/containerd/containerd/v2 v2.0.2 CVE-2024-25621 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH
stdlib 1.22.10 CVE-2025-58183 HIGH
stdlib 1.22.10 CVE-2025-58186 HIGH
stdlib 1.22.10 CVE-2025-58187 HIGH
stdlib 1.22.10 CVE-2025-58188 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

Co-authored-by: eldad <eldad@appwrite.io>
@github-actions
Copy link

✨ Benchmark results

  • Requests per second: 1,220
  • Requests with 200 status code: 219,561
  • P99 latency: 0.162394061

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,220 1,317
200 219,561 237,187
P99 0.162394061 0.157562602

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.

3 participants