MCPcopy
hub / github.com/pallets/werkzeug / get_headers

Method get_headers

src/werkzeug/exceptions.py:549–557  ·  view source on GitHub ↗
(
        self,
        environ: WSGIEnvironment | None = None,
        scope: dict[str, t.Any] | None = None,
    )

Source from the content-addressed store, hash-verified

547 self.units = units
548
549 def get_headers(
550 self,
551 environ: WSGIEnvironment | None = None,
552 scope: dict[str, t.Any] | None = None,
553 ) -> list[tuple[str, str]]:
554 headers = super().get_headers(environ, scope)
555 if self.length is not None:
556 headers.append(("Content-Range", f"{self.units} */{self.length}"))
557 return headers
558
559
560class ExpectationFailed(HTTPException):

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
get_headersMethod · 0.45

Tested by

no test coverage detected