Commit 829c544
authored
Do not flag embedded deck.gl rows as unloadable in the share-readiness check (#1823)
* fix(share): do not flag embedded deck.gl rows as unloadable
Two follow-ups to the share-readiness check in #1812, from review comments
that landed after that PR merged.
A non-GeoJSON deck.gl visualization (arc, heatmap, hexagon built from a CSV)
keeps its rows in `source.data` as an array. `isPlainObject` excludes arrays,
so `carriesOwnData` missed those layers, they fell through to the reference
walk, and a layer whose data travels inside the project file was reported as
"no source" or, when `sourcePath` still held the original CSV name, as a
local file. An array `data` now counts as embedded, like an inline
FeatureCollection. Only a string `data` is a URL.
Separately, a rejected ranged GET no longer condemns the host. `Range` is
CORS-safelisted only for a simple byte range, and an older webview may
preflight it and get no matching `Access-Control-Allow-Headers` back. The
HEAD that preceded the retry already proved the host answers and lets this
origin read the response, so a rejection there is about the ranged request
rather than the host: the probe falls back to the HEAD's verdict instead of
reporting "a browser cannot fetch this host" for a host whose plain GET a
renderer would fetch fine.
Refs #1671.
* Assert the ranged GET ran in the fallback tests
Both fallback tests rejected every non-HEAD request but never checked that a
GET was attempted, so they would have kept passing if the retry were dropped
entirely: a bare HEAD 405 already reads as reachable and a bare 403 as
credentialed. They now record each attempt through a shared helper and assert
HEAD followed by GET with `Range: bytes=0-0`. Verified by deleting the retry
locally, which takes the suite from 26 passing to 3 failing instead of 1.1 parent 925d5cc commit 829c544
2 files changed
Lines changed: 92 additions & 3 deletions
File tree
- apps/geolibre-desktop/src/lib
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
381 | 386 | | |
382 | 387 | | |
383 | 388 | | |
| |||
513 | 518 | | |
514 | 519 | | |
515 | 520 | | |
516 | | - | |
517 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
518 | 537 | | |
519 | 538 | | |
520 | 539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
| |||
194 | 211 | | |
195 | 212 | | |
196 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
197 | 231 | | |
198 | 232 | | |
199 | 233 | | |
| |||
332 | 366 | | |
333 | 367 | | |
334 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
335 | 405 | | |
336 | 406 | | |
337 | 407 | | |
| |||
0 commit comments