Hi, Am Sonntag, 19. Januar 2014 03:04:40 UTC+1 schrieb Benjamin R. Haskell: > > On Sat, 18 Jan 2014, Brian Craft wrote: > > > http://www.youtube.com/watch?v=OEZZOz6__CY > > > > At about 30 min he mentions that gzip, etc. aren't so interesting here > > because we can use, um.. something transfer, proxies... don't know > > what he's saying. Anyone know what he's talking about? > > Slide for context: > > {:media-type "application/edn" > :language "de" > :charset "UTF-8" > :encoding "deflate"} > > With that on-screen, he says: > > """ > ...and we have an encoding, which can be for example, deflate or gzip or > like that, um, which we don't care about a lot, I think, on this side of > the > server, because we can use like transparent proxies to do all those > on-the-fly gzip things for us, but it's possible. > """ > > Presumably, he's talking about something like putting a Clojure app > behind an nginx frontend server, where handling gzip is as simple as > adding 'gzip on;' to the 'server {}' configuration block. (So, you > don't care about gzip'ing on the Clojure side of the application, you > care about it on the transparent-proxying-server side.) >
Yes, that's exactly what I meant in the talk. Liberator can negotiate the content encoding but I does not implement any out of the box. If you really want to do it in your liberator resource, you'd need to implement it in your handler function and must not forget to set the "content-encoding" header. However, it is much easier to delegate this to a transparent proxy. If you want to have a ring-only system, then https://github.com/mikejs/ring-gzip-middleware might be a way to implement content-encoding lightweight. -billy. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.