Skip to content

Conversation

@cobyeastwood183
Copy link
Contributor

@cobyeastwood183 cobyeastwood183 commented Jun 5, 2025

A fix for #84934. Body can be string or null, this makes body null when form method is get, head, or options.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@cobyeastwood183 cobyeastwood183 requested a review from a team as a code owner June 5, 2025 22:55
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 5, 2025
@cobyeastwood183 cobyeastwood183 changed the title fix(uptime): Drop body when form method is get or head fix(uptime): Make body null when form method is get, head, or options Jun 7, 2025
@evanpurkhiser
Copy link
Member

Thanks for this, going to iterate on this!

@evanpurkhiser
Copy link
Member

Hmmm, we should already be hiding the body using this

visible={({model}: any) =>
!['GET', 'HEAD'].includes(model.getValue('method'))
}

evanpurkhiser added a commit that referenced this pull request Jun 9, 2025
- When chaining methods from POST -> GET (or similar), do not display
  the body in the preview HTTP request.

- Clear the body when saving and a body was previously set.

- Include `OPTIONS` in disallowed body methods

Fixes: [RTC-1004: Uptime Monitoring - GET req includes body](https://linear.app/getsentry/issue/RTC-1004/uptime-monitoring-get-req-includes-body)
Fixes: #84934
Replaces: #93001
@evanpurkhiser
Copy link
Member

Closing out in favor of #93111

@cobyeastwood183
Copy link
Contributor Author

Thanks for the review! Correct, the body was already hidden, was trying to avoid setting in two places. But looking at your fix, it was probably unneeded.

evanpurkhiser added a commit that referenced this pull request Jun 9, 2025
- When chaining methods from POST -> GET (or similar), do not display
  the body in the preview HTTP request.

- Clear the body when saving and a body was previously set.

- Include `OPTIONS` in disallowed body methods

Fixes: [RTC-1004: Uptime Monitoring - GET req includes body](https://linear.app/getsentry/issue/RTC-1004/uptime-monitoring-get-req-includes-body)
Fixes: #84934
Replaces: #93001
evanpurkhiser added a commit that referenced this pull request Jun 9, 2025
- When chaining methods from POST -> GET (or similar), do not display
  the body in the preview HTTP request.

- Clear the body when saving and a body was previously set.

- Include `OPTIONS` in disallowed body methods

Fixes: [RTC-1004: Uptime Monitoring - GET req includes
body](https://linear.app/getsentry/issue/RTC-1004/uptime-monitoring-get-req-includes-body)
Fixes: #84934
Replaces: #93001

Requires: #93110
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
- When chaining methods from POST -> GET (or similar), do not display
  the body in the preview HTTP request.

- Clear the body when saving and a body was previously set.

- Include `OPTIONS` in disallowed body methods

Fixes: [RTC-1004: Uptime Monitoring - GET req includes
body](https://linear.app/getsentry/issue/RTC-1004/uptime-monitoring-get-req-includes-body)
Fixes: #84934
Replaces: #93001

Requires: #93110
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants