Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(state): skip Content-Location header for GET requests #6901

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

vinceAmstoutz
Copy link
Contributor

Q A
Branch? 4.0
Tickets Closes #6750
License MIT

Eliminates the unnecessary Content-Location header from GET responses to prevent potential issues, such as with temporary or preview resources lacking an ID.

While compliant with RFC 9110, this header is redundant and not required. For more details, refer to #6750.

@vinceAmstoutz vinceAmstoutz changed the title fix(state): stop adding Content-Location header for GET responses fix(state): stop adding Content-Location header for GET operations Jan 9, 2025
@vinceAmstoutz vinceAmstoutz changed the title fix(state): stop adding Content-Location header for GET operations fix(state): remove Content-Location header for GET operations Jan 9, 2025
@vinceAmstoutz vinceAmstoutz changed the title fix(state): remove Content-Location header for GET operations fix(state): avoid adding Content-Location header for GET operations Jan 9, 2025
@vinceAmstoutz vinceAmstoutz changed the title fix(state): avoid adding Content-Location header for GET operations fix(state): skip Content-Location header for GET requests Jan 9, 2025
@vinceAmstoutz
Copy link
Contributor Author

For information @soyuka, php-cs-fixer job is solved in #6902 and other CI failed jobs in this commit.

@vinceAmstoutz vinceAmstoutz force-pushed the fix/no-content-location-on-get branch 2 times, most recently from 25c7fa4 to a162646 Compare January 9, 2025 15:26
@vinceAmstoutz vinceAmstoutz requested a review from soyuka January 9, 2025 15:27
@vinceAmstoutz vinceAmstoutz force-pushed the fix/no-content-location-on-get branch from ad0de1c to 0a3fdf1 Compare January 9, 2025 16:26
Avoids adding a redundant `Content-Location` header in GET responses, which can cause unnecessary complications, such as issues with temporary or preview resources lacking an ID. While this behavior complies with the HTTP specification (RFC 9110), it is unnecessary and potentially problematic.
@vinceAmstoutz vinceAmstoutz force-pushed the fix/no-content-location-on-get branch from 0a3fdf1 to 6d74cd2 Compare January 13, 2025 08:44
@vinceAmstoutz vinceAmstoutz requested a review from soyuka January 13, 2025 09:19
@soyuka soyuka merged commit 36cee39 into api-platform:4.0 Jan 13, 2025
59 checks passed
@vinceAmstoutz vinceAmstoutz deleted the fix/no-content-location-on-get branch January 13, 2025 10:25
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