marshmallow-code / marshmallow-code/flask-smorest

Add header to 340 response

Open
#319 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
717
Forks
77
Avg merge
7h 49m
Merged PRs (30d)
3

Description

See https://github.com/marshmallow-code/flask-smorest/issues/233#issuecomment-787909415.

https://httpstatuses.com/304

> The server generating a 304 response MUST generate any of the following header fields that would have been sent in a 200 OK response to the same request: Cache-Control, Content-Location, Date, ETag, Expires, and Vary.

In our case, flask-smorest returns 304 due to ETag so that would be a ETag header.

TODO:

- [ ] Add ETag header to 304 response
- [ ] Document that header in 304 response doc

Users returning 304 through automatic mechanisms would be free to override.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing flask-smorest's automatic ETag handling and the path that produces a 304 response, using the linked issue discussion for context. Check the existing 304 response documentation, then confirm that the ETag header is included while allowing users to override automatically generated 304 responses; completion covers both TODO items.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
api, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.