Regression: Fix incompatibility of apps http requests#24276
Merged
sampaiodiego merged 1 commit intodevelopfrom Jan 25, 2022
Merged
Regression: Fix incompatibility of apps http requests#24276sampaiodiego merged 1 commit intodevelopfrom
sampaiodiego merged 1 commit intodevelopfrom
Conversation
| import { AppServerOrchestrator } from '../orchestrator'; | ||
| import { getUnsafeAgent } from '../../../../server/lib/getUnsafeAgent'; | ||
|
|
||
| const isGetOrHead = (method: string): boolean => ['GET', 'HEAD'].includes(method.toUpperCase()); |
Member
There was a problem hiding this comment.
it hurts me deep down in my heart having to upper case method every time 🙈
Member
Author
There was a problem hiding this comment.
Calling a method every time is bad but creating an array every time doesn't raise any flags? 😛
Jokes aside, I'd say the impact is negligible for both these things, and it ends up being more fail-proof - IMHO it's a micro-optimization
Member
There was a problem hiding this comment.
yep.. I agree, and that's why I didn't ask for changes.. I was just expressing my feeling :P
sampaiodiego
approved these changes
Jan 25, 2022
gabriellsh
added a commit
that referenced
this pull request
Jan 25, 2022
…age-template-2 * 'develop' of github.com:RocketChat/Rocket.Chat: (81 commits) Language update from LingoHub 🤖 (#24268) Regression: Fix incompatibility of apps http requests (#24276) [IMPROVE] lib/Statistics improved and metrics collector (#24177) [FIX] Fixing the changing custom status behavior (#24218) Regression: Align Omni-Source icon sizes with designs (#24269) Regression: Fix Inactive Departments still visible on Livechat (#24267) [FIX] Solved Report Message Blank (#24262) [FIX] Errors on advanced sync prevent LDAP users from logging in (#23958) Chore: Convert model LoginServiceConfiguration to raw (#24187) [FIX] Make canned responses popup dependent on Canned_responses_enabled setting (#23804) [FIX] Wrong german translation for 2FA-Promt (#24126) Bump follow-redirects from 1.14.5 to 1.14.7 in /ee/server/services (#24182) Chore: Update pino and pino-pretty (#24242) [FIX] Avoid updating all rooms with visitor abandonment queries (#24252) Add: Alpine image as option for build (#12548) Fixed broken links in setup wizard (#24248) [FIX] Apps Contextual Bar not carrying title and room information (#24241) Chore: Bump fuselage hooks (#24233) Regression: Remove extra call to `useOutsideClick` hook not following the function signature (#24243) [FIX] Change canned response model index to match other definition (#24235) ...
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes (including videos or screenshots)
HTTP GET and HEAD requests made with an empty object as
datawere breaking, as the bridge converted this to the request's body as'{}'but meteor's new lib doesn't allow for body content on either of this request methods.To maintain compatibility, we forced an empty body whenever we have a GET or HEAD request. This was probably the case previously, with the body of requests made with this methods being ignored either before being sent or in the third party server receiving the request
Issue(s)
Steps to test or reproduce
Further comments