# Behavior traces — actix/actix-web

> Canonical page: https://codevetter.com/unpack/actix-web/behavior-traces

# Behavior traces — actix/actix-web

Scanned commit 30c831fce5328ccf916bea77e59ce6419b457e39 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The investigation followed startup, routed handler execution, JSON extraction, multipart disk writes, static delivery, and outbound redirects through their implementation files. Startup consumes application registrations and resolves service/data factories before handling traffic. Request paths branch on guards, extractor failures, and resource defaults. Uploads end in temporary storage unless application code supplies a separate persistence step.
- Startup begins at basic::main → HttpServer::new → bind → bind_addrs → listen → run. bind_addrs attempts every resolved address and returns successful listeners if any bind succeeds, even when another address fails. — [actix-web/examples/basic.rs#L19-L43](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/examples/basic.rs#L19-L43) [actix-web/src/server.rs#L503-L510](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/server.rs#L503-L510) [actix-web/src/server.rs#L1358-L1384](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/server.rs#L1358-L1384)
- Worker construction proceeds through listen's closure → factory().into_factory() → App::into_factory → AppInit::new_service, which installs a default 404, consumes registrations, and constructs AppRoutingFactory plus the ResourceMap. — [actix-web/src/server.rs#L686-L693](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/server.rs#L686-L693) [actix-web/src/app.rs#L457-L468](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/app.rs#L457-L468) [actix-web/src/app_service.rs#L66-L105](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/app_service.rs#L66-L105)
- App initialization constructs asynchronous data futures and the endpoint future, awaits data results then endpoint initialization, populates extensions, and returns AppInitService; AppRoutingFactory initializes child services and builds the ordered Router. — [actix-web/src/app_service.rs#L121-L158](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/app_service.rs#L121-L158) [actix-web/src/app_service.rs#L282-L313](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/app_service.rs#L282-L313)
- For basic's GET /resource1/{name}/index.html, AppInitService::call → AppRouting::call → ResourceService::call → handler_service → Path::from_request → index produces the greeting. Failed application matching uses 404; unmatched resource routes use the resource's 405 default. — [actix-web/examples/basic.rs#L3-L6](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/examples/basic.rs#L3-L6) [actix-web/src/app_service.rs#L331-L348](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/app_service.rs#L331-L348) [actix-web/src/resource.rs#L75-L87](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/resource.rs#L75-L87) [actix-web/src/resource.rs#L562-L569](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/resource.rs#L562-L569) [actix-web/src/handler.rs#L106-L118](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/handler.rs#L106-L118) [actix-web/src/types/path.rs#L97-L105](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/types/path.rs#L97-L105)
- A JSON handler argument follows Json::from_request → JsonBody::new(...).limit(...) → JsonBody::poll → serde_json::from_slice → JsonExtractFut. Overflow or decoding errors invoke a configured error handler when present and prevent normal handler invocation. — [actix-web/src/types/json.rs#L144-L155](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/types/json.rs#L144-L155) [actix-web/src/types/json.rs#L174-L191](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/types/json.rs#L174-L191) [actix-web/src/types/json.rs#L418-L433](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/types/json.rs#L418-L433) [actix-web/src/handler.rs#L108-L115](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-web/src/handler.rs#L108-L115)
- POST /videos follows Multipart::from_req → MultipartForm::from_request → multipart.try_next → T::handle_field → TempFile::read_field → write_all/flush → T::from_state → post_video. The example returns upload metadata and describes deletion of the temporary file; it contains no promotion to durable storage. — [actix-multipart/src/multipart.rs#L100-L110](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-multipart/src/multipart.rs#L100-L110) [actix-multipart/src/form/mod.rs#L458-L505](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-multipart/src/form/mod.rs#L458-L505) [actix-multipart/src/form/tempfile.rs#L42-L75](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-multipart/src/form/tempfile.rs#L42-L75) [actix-multipart/examples/form.rs#L20-L28](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-multipart/examples/form.rs#L20-L28)
- A static GET follows FilesService::call → PathBufWrap::parse_path → optional path_filter → ordered root lookup → NamedFile::open → into_response. Directory and precompressed branches can return earlier; normal file responses evaluate validators and ranges before streaming. — [actix-files/src/service.rs#L138-L200](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-files/src/service.rs#L138-L200) [actix-files/src/service.rs#L255-L291](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-files/src/service.rs#L255-L291) [actix-files/src/named.rs#L478-L511](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-files/src/named.rs#L478-L511) [actix-files/src/named.rs#L549-L585](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/actix-files/src/named.rs#L549-L585)
- An outbound JSON request follows RequestSender::send_json → send_body → connector.call → SendClientRequest. Redirect middleware rebuilds Location targets while budget remains; 301/302/303 can change methods to GET, whereas 307/308 retain the method and reuse only reusable body bytes. — [awc/src/sender.rs#L183-L226](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/awc/src/sender.rs#L183-L226) [awc/src/builder.rs#L252-L264](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/awc/src/builder.rs#L252-L264) [awc/src/middleware/redirect.rs#L160-L224](https://github.com/actix/actix-web/blob/30c831fce5328ccf916bea77e59ce6419b457e39/awc/src/middleware/redirect.rs#L160-L224)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
