Commit d5a7e3b
Fix VS insertion: JSON serialization and disable AutoComplete (#16042)
* Fix insertion: use Invoke-WebRequest for app.config to avoid XML auto-parse
Invoke-RestMethod auto-parses XML responses into XmlDocument objects.
When embedded in the push body and serialized with ConvertTo-Json -Depth 10,
the DOM tree overflows the depth limit, producing truncated JSON that AzDO
rejects with 'The body of the request contains invalid Json'.
Switch to Invoke-WebRequest which returns the raw string content.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix insertion: ensure string content and explicit UTF-8 encoding
The previous fix removed the ConvertTo-Json depth overflow warning, but
Invoke-WebRequest.Content returns byte[] in PS7 when the response lacks
charset in content-type. ConvertTo-Json serializes byte[] as an integer
array instead of a string, producing structurally valid but semantically
wrong JSON that AzDO rejects.
Fix: explicitly decode byte[] to UTF-8 string, send body as UTF-8 bytes
with explicit content-type charset.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Disable AutoComplete — WIF token cannot vote for others (TF401186)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a818e2f commit d5a7e3b
1 file changed
Lines changed: 26 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
257 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
258 | 267 | | |
259 | 268 | | |
260 | 269 | | |
| |||
265 | 274 | | |
266 | 275 | | |
267 | 276 | | |
268 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
269 | 283 | | |
270 | 284 | | |
271 | 285 | | |
| |||
311 | 325 | | |
312 | 326 | | |
313 | 327 | | |
314 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
315 | 334 | | |
316 | 335 | | |
317 | 336 | | |
| |||
0 commit comments