radareorg/radare2-webui

Static Gzip support for the r2 webserver

trufae opened this issue · 0 comments

Describe the issue

Just using the tiled webui as an example.

  • source = 26KB
  • compiled = 24KB
  • gzipped = 7KB

By supporting early gzip support in the http webserver we may solve the following two issues:

  • git grep wont be spotting things in precompiled files
  • faster loading times and smaller files to ship

Possible fix

When the client requests a file from the server. the server may check if a file appending .gz exists. if so, just download it and add the compression header: Content-Encoding: gzip.

As long as this is a non-standard behaviour. it wont work with other webservers on top of r2. So it will probably need to be implemented in different ways for them or just drop both files (js and .js.gz), but that wont be an improvement at all