starlette icon indicating copy to clipboard operation
starlette copied to clipboard

The little ASGI framework that shines. 🌟

Results 165 starlette issues
Sort by recently updated
recently updated
newest added

# Summary Implement the ETagMiddleware to drop the response body if the content not changed. # Checklist - [x] I understand that this PR may be closed in case there...

Issue: https://github.com/encode/starlette/issues/2599 Discussion: https://github.com/encode/starlette/discussions/2495 # Summary Change regex used to remove root_path to consider only the root path without match simillar endpoint that contains the root_path as substring. ex: ```...

Prompted by https://github.com/encode/httpx/discussions/3287 --- `starlette` is currently using private imports from `httpx`... https://github.com/encode/starlette/blob/c78c9aac17a4d68e0647252310044502f1b7da71/starlette/testclient.py#L500-L513 These are broken against the latest minor point release, which includes this (internal) refactoring... https://github.com/encode/httpx/pull/3245 --- It's...

# Summary As per title, this adds support for [ASGI pathsend](https://asgi.readthedocs.io/en/latest/extensions.html#path-send) extension on `FileResponse` class for servers implementing it. This is a re-work of #2435 combined with parts of #2616,...

# Summary Resolve the bug (or limitation) in [this related discussion](https://github.com/encode/starlette/discussions/2522) where `Request.url_for()` cannot be called in a middleware inheriting from `BaseHTTPMiddleware` before the `Router`/`call_next` is invoked. # Checklist -...

I want to save request to ContextVar so I can use it anywhere. Here is code sample: ```python from contextvars import ContextVar import uvicorn from fastapi import FastAPI from starlette.middleware.base...

My test code: ```python from fastapi import FastAPI import uvicorn from staticfiles import StaticFiles app = FastAPI() app.mount("/music", StaticFiles(directory="/home/hanxi/work/xiaomusic/music", follow_symlink=True), name="music") uvicorn.run( app, host=["::", "0.0.0.0"], port=3333, ) ``` The directory...

staticfiles

After this, we can implement on Uvicorn side. We may have too much noise from other responses, tho? We should probably supress the others.

- Closes https://github.com/encode/starlette/issues/2673