Skip to content

Conversation

@gi0baro
Copy link
Contributor

@gi0baro gi0baro commented Jan 22, 2024

Summary

As per title, this adds support for ASGI pathsend extension on FileResponse class for servers implementing it.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

Copy link
Owner

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need tests.

@abersheeran is this the only thing needed on the implementation side?

@abersheeran
Copy link
Contributor

@abersheeran is this the only thing needed on the implementation side?

Yes, its actual logic implementation is all on the server side.

@gi0baro
Copy link
Contributor Author

gi0baro commented Jan 22, 2024

@Kludex I added a test for this, but it only test the correctness of the messages as TestClient doesn't support pathsend directly. Let me know if this is ok for you.

@Kludex
Copy link
Owner

Kludex commented Jan 22, 2024

Reference of the previous PR regarding this extension: #1288

@gi0baro
Copy link
Contributor Author

gi0baro commented Jan 22, 2024

Reference of the previous PR regarding this extension: #1288

🤔 http.response.zerocopysend (ASGI ref) != http.response.pathsend (ASGI ref)

@Kludex
Copy link
Owner

Kludex commented Jan 22, 2024

OHHHH, this is the one you created. Sorry!

@Kludex Kludex merged commit 7936e86 into Kludex:master Jan 22, 2024
@Kludex
Copy link
Owner

Kludex commented Jan 22, 2024

Thanks @gi0baro 🙏

gi0baro added a commit to gi0baro/starlette that referenced this pull request Jul 23, 2024
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