Hi. HTTP requests with redirects to a location with :
in the URL, for example Location: https://play.date/?x:s
crashes a device (2.7.2) and the simulator (also 2.7.2, Mac)
Other Locations seem to work as expected
Sample code:
import "CoreLibs/graphics"
import "CoreLibs/timer"
local gfx <const> = playdate.graphics
function appSetup()
playdate.network.setEnabled(
true,
function (errorMessage)
if errorMessage then
print("network error: " .. errorMessage)
end
end
)
end
appSetup()
local server = nil
local data = ""
local loaded = false
local location = "https://play.date/?x:s"
function playdate.update()
gfx.clear()
if loaded then
gfx.drawText(data, 0, 0)
else
gfx.drawText("loading " .. location, 0, 0)
end
if server == nil then
server = playdate.network.http.new("httpstat.us", 443, true)
server:setRequestCallback(function()
data = data .. server:read()
end)
server:setRequestCompleteCallback(function ()
loaded = true
end)
server:get("/302", {
["X-HttpStatus-Response-Location"] = location
})
end
gfx.sprite.update()
playdate.timer.updateTimers()
end