Send to zulip

This commit is contained in:
Koper
2023-11-20 21:39:33 +07:00
parent 82f50817f8
commit ba40d28152
3609 changed files with 2311843 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
function addContentType(req) {
var httpRequest = req.httpRequest || {};
var headers = httpRequest.headers;
// We don't want to force a content type on presigned urls
if (headers && !req.isPresigned()) {
if (httpRequest.body && !headers['Content-Type']) {
// React Native's android XHR requires Content-Type to be defined if there is a body
headers['Content-Type'] = '';
}
}
}
/**
* @api private
*/
module.exports = {
addContentType: addContentType
};