react-native-windows 0.73.1 → 0.73.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.73.1</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.73.2</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>73</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>1</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>2</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>60459824cfc243812bc7a160237633477169144f</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>4896ca53194c4b669cb3d4852b9d2420631f78fc</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -80,6 +80,12 @@ void BaseFileReaderResource::ReadAsDataUrl(
80
80
  std::copy(encode_base64(bytes.cbegin()), encode_base64(bytes.cend()), ostream_iterator<char>(oss));
81
81
  result += oss.str();
82
82
 
83
+ // https://unix.stackexchange.com/questions/631501
84
+ auto padLength = 4 - (oss.tellp() % 4);
85
+ for (auto i = 0; i < padLength; ++i) {
86
+ result += '=';
87
+ }
88
+
83
89
  resolver(std::move(result));
84
90
  }
85
91
 
@@ -202,29 +202,27 @@ IAsyncOperation<HttpRequestMessage> WinRTHttpResource::CreateRequest(
202
202
  content = HttpStreamContent{std::move(stream)};
203
203
  } else if (data.find("formData") != data.cend()) {
204
204
  winrt::Windows::Web::Http::HttpMultipartFormDataContent multiPartContent;
205
- auto &formData = data["formData"].AsObject();
205
+ auto &formData = data["formData"].AsArray();
206
206
 
207
207
  // #6046 - Overwriting WinRT's HttpMultipartFormDataContent implicit Content-Type clears the generated boundary
208
208
  contentType = nullptr;
209
209
 
210
210
  for (auto &formDataPart : formData) {
211
211
  IHttpContent formContent{nullptr};
212
- auto &itr = formDataPart.second["string"];
213
- if (!formDataPart.second["string"].IsNull()) {
214
- formContent = HttpStringContent{to_hstring(formDataPart.second["string"].AsString())};
215
- } else if (!formDataPart.second["uri"].IsNull()) {
216
- auto filePath = to_hstring(formDataPart.second["uri"].AsString());
212
+ auto &formDataPartObj = formDataPart.AsObject();
213
+ if (!formDataPartObj["string"].IsNull()) {
214
+ formContent = HttpStringContent{to_hstring(formDataPartObj["string"].AsString())};
215
+ } else if (!formDataPartObj["uri"].IsNull()) {
216
+ auto filePath = to_hstring(formDataPartObj["uri"].AsString());
217
217
  auto file = co_await StorageFile::GetFileFromPathAsync(filePath);
218
218
  auto stream = co_await file.OpenReadAsync();
219
219
  formContent = HttpStreamContent{stream};
220
220
  }
221
-
222
221
  if (formContent) {
223
- AttachMultipartHeaders(formContent, formDataPart.second["headers"].AsObject());
224
- multiPartContent.Add(formContent, to_hstring(formDataPart.second["fieldName"].AsString()));
222
+ AttachMultipartHeaders(formContent, formDataPartObj["headers"].AsObject());
223
+ multiPartContent.Add(formContent, to_hstring(formDataPartObj["fieldName"].AsString()));
225
224
  }
226
225
  } // foreach form data part
227
-
228
226
  content = multiPartContent;
229
227
  }
230
228
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.73.1",
3
+ "version": "0.73.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",