Skip to content

Conversation

@nh2
Copy link
Contributor

@nh2 nh2 commented Oct 2, 2019

Fixes #17635.

Commit message contains a summary.

…rdoob#17635.

Until now, the response body was saved to the cache, no matter what the HTTP
status code was.

So a request that returned e.g. HTTP 404 with response body
"No such file" and `onError` being called would, if run a second time,
be found in the cache with "No such file" as the result, and
`onLoad("No such file")` would be called, which is nonsensical.

One common failure was that texture loaders would thus interpret
plain error strings as textures to decode, and failed.
@nh2
Copy link
Contributor Author

nh2 commented Oct 2, 2019

Please test this thoroughly, as I have only written this fix, not tested it.

It's most likely right, but better safe than sorry.

Copy link
Collaborator

@Mugen87 Mugen87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, let's try this.

@mrdoob mrdoob added this to the r110 milestone Oct 2, 2019
@mrdoob mrdoob merged commit 6fcaa8e into mrdoob:dev Oct 2, 2019
@mrdoob
Copy link
Owner

mrdoob commented Oct 2, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FileLoader incorrectly caches responses irrespective of HTTP response code

3 participants