Skip to content

[BUG] Cache incomplete content when network error during httpDo #45

@gebing

Description

@gebing
  1. Make a ajax call which generating file cache, eg. aq.ajax(url, File.class, cb);
  2. If there is network error during AbstractAjaxCallback#copy(InputStream is, OutputStream os, String encoding, int max), there will generate a cached file with incomplete content.
  3. Make another ajax call with same url and cache, eg. aq.ajax(url, File.class, expire, cb), AQuery will return success with incomplete content file.

Suggestion:

in function AbstractAjaxCallback#copy, there shuold catch exception and remove incomplete cache file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions