Differentiate between string and image loading requests
interested
syncpulse
Currently, upon reviewing the request headers, there does not seem to be any way to differentiate between string and image loading requests for the same URL. With the limitations of VRCUrl, it would be very nice to have a way to tell them apart.
Some potential solutions include specifying a value for the Accept header, extending the User-Agent header, or adding a new VRChat-specific header. I believe the last option would be the least likely to break any existing worlds, but there are various pros and cons of each.
An example use-case would be a system to download a mesh (binary data, string loading) and its texture (image loading) using a single URL. The server could use the headers to determine which content it should respond with.
This would also be useful for decreasing the size of VRCUrl pools as used in YTS and other worlds. We are already using useragent-dependent responses between video player and string loading useragents, but we'd like to do the same with image loading too.
Log In
Fax
interested
Thanks for clarifying!
Fax
needs more information
Hi syncpulse! Thank you for your request.
Are you able to use MIME types to differentiate between different types of requests? That might allow you to download binary data and textures using a single URL.
Or are you asking for something else?
Haxy
Fax currently both requests come to the server with the exact same headers, so there's no way to know what to serve for an image and text on the same URL, having a additional field or a change to the "accepts" header would be great to differentiate requests on the server end, cutting the required pool URLs in half in theory for each world
syncpulse
Haxy Fax yup exactly. If the client specifies MIME types in the Accept header that would work fine for me. Maybe
image/*
for image loading and */*
for string? But I'm also open to other ideas. Like I said in the OP there are pros and cons of each way. Happy to discuss.