world.Export() seems to be very picky with what it does and does not work in, with no real rhyme or reason between what works and does not work. This also breaks over multiple BYOND versions
Working examples include
- Loading a BYOND members profile (Code 200)
- Loading a JSON API (Code 200)
- Loading a normal HTTP website (Code 200)
Non-working examples include:
- Loading icanhazip.com (Code 200) [This may be due to a header with unicode in it]
- Loading a 400 bad request page
- Loading a 404 page
- Sometimes a code 200 page randomly gets its content truncated
Summarised: Seems to break with anything that isn't code 200
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
Code that doesnt work
/world/New()
var/http[] = world.Export("http://icanhazip.com")
world.log << "Params: [list2params(http)]"
world.log << "Len: [length(http)]"
Code that does work
/world/New()
var/http[] = world.Export("http://byond.com/members/affectedarc07?format=text")
world.log << "Params: [list2params(http)]"
world.log << "Len: [length(http)]"
Expected Results:
world.Export() to have consistent results and work properly
Actual Results:
Spurious failures with no real rhyme or reason
Does the problem occur:
Every time? Or how often? Its spurious
In other games? Tested on a base codebase
In other user accounts? Yes
On other computers? Yes
When does the problem NOT occur?
See earlier examples of what does work
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Does not work in 1536 either
Workarounds:
Use an external HTTP client library with FFI
no https support. Export crashes on an error response.
I've been pressuring lummy to implement curl for this very reason.