google / neuroglancer

WebGL-based viewer for volumetric data
Apache License 2.0
1.07k stars 295 forks source link

fix(http_requests): allow blob: to prepend URL string #637

Open xgui3783 opened 1 month ago

xgui3783 commented 1 month ago

This is my first PR in this repo. Apologies if I have made any mistakes.

Currently, if the data source originates from the web (thus have the URL of https?://), the parseUrl function correctly parses the protcol, host and path.

In our usecase, we often need to download the entire (nifti) image, preprocess them, and generate a blob URL. According to mdn doc on URL.createObjectURL , it creates a URL with blob: prepended. This fails the check as it is implemented currently.

This PR addresses this issue.

google-cla[bot] commented 1 month ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

xgui3783 commented 1 month ago

I signed it.

(Looks like I have initiated the CLA, but not signed it until a few seconds ago)