You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue with @tauri-apps/plugin-http when trying to fetch a URL that contains dots in the path. For example, attempting a fetch on the URL http://localhost:8080/abc.test/test.txt results in the following error:
SyntaxError: The string did not match the expected pattern.
Observe that the fetch fails with the mentioned error.
Additional Observations:
If I modify the URL to replace the dot with another character, for example, abc-test, the fetch works correctly.
This behavior seems specific to URLs containing dots in the url path
The JS log is not very detailed; it simply stops at SyntaxError: The string did not match the expected pattern. without a detailed stack trace. The last point of the stack stops right at the fetch function with no further details.
Attempts done
Tried using encodeURI and encodeURIComponent of the URL, but it actually made the situation worse.
Hi there!
I encountered an issue with @tauri-apps/plugin-http when trying to fetch a URL that contains dots in the path. For example, attempting a fetch on the URL http://localhost:8080/abc.test/test.txt results in the following error:
SyntaxError: The string did not match the expected pattern.
Steps to Reproduce:
Additional Observations:
SyntaxError: The string did not match the expected pattern.
without a detailed stack trace. The last point of the stack stops right at the fetch function with no further details.Attempts done
encodeURI
andencodeURIComponent
of the URL, but it actually made the situation worse.Tauri Info:
Is this a known issue with the @tauri-apps/plugin-http package? Are there any workarounds or fixes for this behavior?
Thank you for your help!
The text was updated successfully, but these errors were encountered: