mcxiaoke / android-volley

DEPRECATED
4.29k stars 1.56k forks source link

OOM exception while using HEAD request with Volley framework #139

Closed aipok closed 8 years ago

aipok commented 8 years ago

Memory should not be allocated based on Content length header for HEAD request. responseContents = new byte[0]; should be used for HEAD requests to avoid using device memory.

It is possible to test the issue with HEAD method against huge PDF file (~100-150 Mb). Such request usually end up with OOM exception. With this fix it will get back with reponse very fast and without using extra memory.

aipok commented 8 years ago

Already fixed