microsoft / microsoft/react-native-windows
When 'Content MD5' is passed in the headers during a fetch request, it will cause the request to fail
Open
@JunielKatarn is already working on this.
Since Nov 27, 2023.
Area: Networking
bug
Workstream: Component Parity
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
Problem Description
fetch('https://dpfb.yixunshop.com/api/screen/auth', {
method: 'POST',
body: "{\"no\":\"\",\"username\":\"\",\"password\":\"\"}",
headers: {
Accept: "application/json",
AccessKey: "81506876",
'Content-Date': "1700879664",
// When 'Content MD5' is passed in the headers, it will cause the request to fail
'Content-MD5': "a82322fb6d03879e296243bc55867dce2b72644c0aeaf9829a42ce18af5d8b0e",
'Content-Type': "application/json"
}
}).then(async res => {
console.log('res', await res.text())
}).catch(err => {
console.log('err', err)
// err TypeError: Network request failed
})
Steps To Reproduce
fetch request
Expected Results
No response
CLI version
0.72.6
Environment
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
Memory: 6.77 GB / 15.87 GB
Binaries:
Node:
version: 18.18.2
path: ~\AppData\Local\Temp\yarn--1700880356341-0.3000326603832264\node.CMD
Yarn:
version: 1.22.19
path: ~\AppData\Local\Temp\yarn--1700880356341-0.3000326603832264\yarn.CMD
npm:
version: 9.8.1
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
IDEs:
Android Studio: AI-223.8836.35.2231.11005911
Visual Studio:
- 17.8.34316.72 (Visual Studio Community 2022)
Languages:
Java:
version: 11.0.21
path: C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.7
wanted: ^0.72.6
react-native-windows:
installed: 0.72.20
wanted: 0.72.20
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Target Platform Version
None
Target Device(s)
No response
Visual Studio Version
None
Build Configuration
None
Snack, code example, screenshot, or link to a repository
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.