Opened 3 years ago

Closed 2 years ago

#4977 closed change (fixed)

Request for compressed response in AndroidWebRequest

Reported by: asmirnov Assignee:
Priority: P2 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: Blocked By:
Blocking: Platform: Android
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29382555/

Description (last modified by asmirnov)

Background

In order to save traffic and loading time we can request for 'gzip'ped stream from the server.
Related issue #4916

What to change

Change AndroidWebRequest class to request/return compressed stream from the server.

Attachments (2)

Снимок экрана 2017-03-13 в 11.37.29.png (435.0 KB) - added by asmirnov 3 years ago.
gzip
Снимок экрана 2017-03-13 в 11.40.20.png (455.9 KB) - added by asmirnov 3 years ago.
identity

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by asmirnov

  • Description modified (diff)

comment:2 Changed 3 years ago by asmirnov

As reported in Google blog (https://android-developers.googleblog.com/2011/09/androids-http-clients.html) gzip compression is requested by default and handled automatically:

In Gingerbread, we added transparent response compression. HttpURLConnection will automatically add this header to outgoing requests, and handle the corresponding response:

Accept-Encoding: gzip

Take advantage of this by configuring your Web server to compress responses for clients that can support it. If response compression is problematic, the class documentation shows how to disable it.

but i've seen some feedbacks that it's not done automatically for http:// requests. To be checked.

comment:3 Changed 3 years ago by asmirnov

  • Summary changed from Request for compressed response in WebRequest to Request for compressed response in AndroidWebRequest

comment:4 Changed 3 years ago by asmirnov

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

Changed 3 years ago by asmirnov

gzip

Changed 3 years ago by asmirnov

identity

comment:6 Changed 2 years ago by abpbot

A commit referencing this issue has landed:
Issue 4977 - Request for compressed response in AndroidWebRequest

comment:7 Changed 2 years ago by asmirnov

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.