Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
compress files?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 42 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
spicyj  
View profile  
 More options Jun 11 2008, 11:30 am
From: spicyj <spicyjalap...@gmail.com>
Date: Wed, 11 Jun 2008 08:30:17 -0700 (PDT)
Local: Wed, Jun 11 2008 11:30 am
Subject: compress files?
Anyone know how to write a Rack middleware to serve static files as
gzipped?

I can see how to set the Content-Encoding header, but the file still
needs to be zipped up.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Wiggins  
View profile  
 More options Jun 11 2008, 3:57 pm
From: "Adam Wiggins" <a...@heroku.com>
Date: Wed, 11 Jun 2008 12:57:17 -0700
Local: Wed, Jun 11 2008 3:57 pm
Subject: Re: compress files?

On Wed, Jun 11, 2008 at 8:30 AM, spicyj <spicyjalap...@gmail.com> wrote:
> Anyone know how to write a Rack middleware to serve static files as
> gzipped?

How about:

class GzipOutputFilter
        def initialize(app)
                @app = app
        end

        def call(env)
                out = @app.call(env)

                gzip = IO.popen('gzip', 'r+')
                gzip.write out[2]    # handles String only, would be nice to check
for IO object too
                gzip.close_write

                out[1]['Content-encoding'] = 'gzip'
                out[2] = gzip

                out
        end
end

class HelloHandler
        def call(env)
                [ 200, { 'Content-type' => 'text/plain' }, 'hello, world' ]
        end
end

use Rack::Lint
use GzipOutputFilter
run HelloHandler.new

Adam


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ezra Zygmuntowicz  
View profile  
 More options Jun 11 2008, 4:12 pm
From: Ezra Zygmuntowicz <e...@engineyard.com>
Date: Wed, 11 Jun 2008 13:12:20 -0700
Local: Wed, Jun 11 2008 4:12 pm
Subject: Re: compress files?

On Jun 11, 2008, at 8:30 AM, spicyj wrote:

> Anyone know how to write a Rack middleware to serve static files as
> gzipped?

> I can see how to set the Content-Encoding header, but the file still
> needs to be zipped up.

Here is a middleware adapted from Mongrel's Deflate Handler:

require 'zlib'

class Deflater
   include Zlib

   def initialize(app)
     @app = app
   end

   def call(env)
     accept = env['HTTP_ACCEPT_ENCODING']
     status, headers, body = @app.call(env)
     if accept and accept.include? 'deflate'
       headers["Content-Encoding"] = "deflate"
       body = deflate(body)
     end
     [status, headers, body]
   end

   def deflate(body)
     deflater = Deflate.new(
       DEFAULT_COMPRESSION,
       # drop the zlib header which causes both Safari and IE to choke
       -MAX_WBITS,
       DEF_MEM_LEVEL,
       DEFAULT_STRATEGY)

     case body
     when IO
       body.rewind if body.respond_to? :rewind
       gzout = StringIO.new(deflater.deflate(body.read, FINISH))
       body.close
     when String
       gzout = StringIO.new(deflater.deflate(body, FINISH))
     end
     gzout.rewind
     gzout
   end

end

Cheers-
- Ezra Zygmuntowicz
-- Founder & Software Architect
-- e...@engineyard.com
-- EngineYard.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Jun 12 2008, 10:33 am
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Thu, 12 Jun 2008 16:33:14 +0200
Local: Thurs, Jun 12 2008 10:33 am
Subject: Re: compress files?

Ezra Zygmuntowicz <e...@engineyard.com> writes:
> On Jun 11, 2008, at 8:30 AM, spicyj wrote:

>> Anyone know how to write a Rack middleware to serve static files as
>> gzipped?

>> I can see how to set the Content-Encoding header, but the file still
>> needs to be zipped up.

> Here is a middleware adapted from Mongrel's Deflate Handler:

I'd like to import this to the Rack tree.

--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ezra Zygmuntowicz  
View profile  
 More options Jun 12 2008, 2:01 pm
From: Ezra Zygmuntowicz <e...@engineyard.com>
Date: Thu, 12 Jun 2008 11:01:37 -0700
Local: Thurs, Jun 12 2008 2:01 pm
Subject: Re: compress files?

On Jun 12, 2008, at 7:33 AM, Christian Neukirchen wrote:

> Ezra Zygmuntowicz <e...@engineyard.com> writes:

>> On Jun 11, 2008, at 8:30 AM, spicyj wrote:

>>> Anyone know how to write a Rack middleware to serve static files as
>>> gzipped?

>>> I can see how to set the Content-Encoding header, but the file still
>>> needs to be zipped up.

>> Here is a middleware adapted from Mongrel's Deflate Handler:

> I'd like to import this to the Rack tree.

Please feel free, maybe just add a note that it was adapted from the  
mongrel deflate handler.

Cheers-

- Ezra Zygmuntowicz
-- Founder & Software Architect
-- e...@engineyard.com
-- EngineYard.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stoyan Zhekov  
View profile  
 More options Jun 12 2008, 9:40 pm
From: Stoyan Zhekov <sto...@gmail.com>
Date: Thu, 12 Jun 2008 18:40:10 -0700 (PDT)
Local: Thurs, Jun 12 2008 9:40 pm
Subject: Re: compress files?
According to that document (and some others), http://developer.yahoo.com/performance/rules.html
, the returned header is:

Content-Encoding: gzip

( headers["Content-Encoding"] = "gzip" )

Which is better/right - deflate of gzip?

On Jun 12, 5:12 am, Ezra Zygmuntowicz <e...@engineyard.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ezra Zygmuntowicz  
View profile  
 More options Jun 12 2008, 11:56 pm
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Thu, 12 Jun 2008 20:56:38 -0700
Local: Thurs, Jun 12 2008 11:56 pm
Subject: Re: compress files?

On Jun 12, 2008, at 6:40 PM, Stoyan Zhekov wrote:

> According to that document (and some others), http://developer.yahoo.com/performance/rules.html
> , the returned header is:

> Content-Encoding: gzip

> ( headers["Content-Encoding"] = "gzip" )

> Which is better/right - deflate of gzip?

        I guess we should support both:

  def call(env)
    accept = env['HTTP_ACCEPT_ENCODING']
    status, headers, body = @app.call(env)
    if accept and [ 'deflate', 'gzip'].include? accept
      headers["Content-Encoding"] = "deflate"
      body = deflate(body)
    end
    [status, headers, body]
  end

Cheers-
- Ezra


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ezra Zygmuntowicz  
View profile  
 More options Jun 13 2008, 12:01 am
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Thu, 12 Jun 2008 21:01:24 -0700
Local: Fri, Jun 13 2008 12:01 am
Subject: Re: compress files?

On Jun 12, 2008, at 8:56 PM, Ezra Zygmuntowicz wrote:

> def call(env)
>   accept = env['HTTP_ACCEPT_ENCODING']
>   status, headers, body = @app.call(env)
>   if accept and [ 'deflate', 'gzip'].include? accept
> -   headers["Content-Encoding"] = "deflate"
> +   headers["Content-Encoding"] = accept
>     body = deflate(body)
>   end
>   [status, headers, body]
> end

- Ezra

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Jun 13 2008, 8:36 am
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Fri, 13 Jun 2008 14:36:41 +0200
Local: Fri, Jun 13 2008 8:36 am
Subject: Re: compress files?

Ezra Zygmuntowicz <ezmob...@gmail.com> writes:
>    if accept and [ 'deflate', 'gzip'].include? accept

Is this the best way we can parse HTTP headers?  Seems a bit to eager to me.

--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ezra Zygmuntowicz  
View profile  
 More options Jun 13 2008, 2:44 pm
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Fri, 13 Jun 2008 11:44:54 -0700
Local: Fri, Jun 13 2008 2:44 pm
Subject: Re: compress files?

On Jun 13, 2008, at 5:36 AM, Christian Neukirchen wrote:

> Ezra Zygmuntowicz <ezmob...@gmail.com> writes:

>>   if accept and [ 'deflate', 'gzip'].include? accept

> Is this the best way we can parse HTTP headers?  Seems a bit to  
> eager to me.

I don't get what you are saying? There is no parsing going on here.

- Ezra


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Jun 14 2008, 8:02 am
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Sat, 14 Jun 2008 14:02:46 +0200
Local: Sat, Jun 14 2008 8:02 am
Subject: Re: compress files?

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

Accessing the value of Accept-Encoding seems to be more complex to me?

--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spicyj  
View profile  
 More options Jun 15 2008, 5:18 pm
From: spicyj <spicyjalap...@gmail.com>
Date: Sun, 15 Jun 2008 14:18:45 -0700 (PDT)
Local: Sun, Jun 15 2008 5:18 pm
Subject: Re: compress files?
WEBRick has the parsing implemented as
WEBrick::HTTPUtils::parse_qvalues(env['HTTP_ACCEPT_ENCODING']).

http://ruby-doc.org/stdlib/libdoc/webrick/rdoc/classes/WEBrick/HTTPUt...

It returns an array sorted in order of browser preference. (Though it
appears not to remove q=0.0 encodings.)

Also, I don't think that gzip and deflate are interchangable formats.
Maybe we need to use Zlib::GzipWriter?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoffer Sawicki  
View profile  
 More options Jun 26 2008, 6:47 pm
From: "Christoffer Sawicki" <christoffer.sawi...@gmail.com>
Date: Fri, 27 Jun 2008 00:47:57 +0200
Local: Thurs, Jun 26 2008 6:47 pm
Subject: Re: compress files?
On Sat, Jun 14, 2008 at 2:02 PM, Christian Neukirchen

<chneukirc...@gmail.com> wrote:
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

> Accessing the value of Accept-Encoding seems to be more complex to me?

I took a quick stab at implementing it properly:
http://pastie.org/private/gkznbcflnc3uhwxoebxa

The accepted_encodings methods definitely needs a second look and a new name.
Provide a little feedback and I might finish it for inclusion. :-)

Cheers,
Christoffer Sawicki


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Jun 27 2008, 7:40 am
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Fri, 27 Jun 2008 13:40:05 +0200
Local: Fri, Jun 27 2008 7:40 am
Subject: Re: compress files?

"Christoffer Sawicki" <christoffer.sawi...@gmail.com> writes:
> On Sat, Jun 14, 2008 at 2:02 PM, Christian Neukirchen
> <chneukirc...@gmail.com> wrote:
>> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

>> Accessing the value of Accept-Encoding seems to be more complex to me?

> I took a quick stab at implementing it properly:
> http://pastie.org/private/gkznbcflnc3uhwxoebxa

> The accepted_encodings methods definitely needs a second look and a new name.
> Provide a little feedback and I might finish it for inclusion. :-)

This looks good.  How does it compare to
http://chneukirchen.org/repos/coset/lib/coset/mimeparse.rb ?

> Cheers,
> Christoffer Sawicki

--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spicyj  
View profile  
 More options Jun 27 2008, 4:21 pm
From: spicyj <spicyjalap...@gmail.com>
Date: Fri, 27 Jun 2008 13:21:10 -0700 (PDT)
Local: Fri, Jun 27 2008 4:21 pm
Subject: Re: compress files?

> This looks good.  How does it compare to
> http://chneukirchen.org/repos/coset/lib/coset/mimeparse.rb?

Looks like the same functionality, and it should be -- the RFC2616
(HTTP/1.1) reads:

> The Accept-Encoding request-header field is similar to Accept, but restricts
> the content-codings (section 3.5) that are acceptable in the response.

> (from http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)

So there should be new name applicable to all of the Accept headers,
as you suggested, and now we can finish the compression middleware.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoffer Sawicki  
View profile  
 More options Jun 28 2008, 12:07 pm
From: "Christoffer Sawicki" <christoffer.sawi...@gmail.com>
Date: Sat, 28 Jun 2008 18:07:43 +0200
Local: Sat, Jun 28 2008 12:07 pm
Subject: Re: compress files?
On Fri, Jun 27, 2008 at 1:40 PM, Christian Neukirchen

<chneukirc...@gmail.com> wrote:
> "Christoffer Sawicki" <christoffer.sawi...@gmail.com> writes:
>> I took a quick stab at implementing it properly:
>> http://pastie.org/private/gkznbcflnc3uhwxoebxa

>> The accepted_encodings methods definitely needs a second look and a new name.
>> Provide a little feedback and I might finish it for inclusion. :-)

> This looks good.  How does it compare to
> http://chneukirchen.org/repos/coset/lib/coset/mimeparse.rb ?

Encoding names are not on the type/subtype form so we can't use
MIMEParse as is for Accept-Encoding.

I don't think it's worth generalizing the current mimeparse.rb code to
cover both Accept and Accept-Encoding; handling Accept-Encoding is
much simpler than Accept (mostly because there's no need to deal with
type specificity).

Once I extend my Accept-Encoding code to handle * and drop the complex
regexp I'll ask the list for a review.

Cheers,
Christoffer Sawicki


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Jun 28 2008, 1:50 pm
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Sat, 28 Jun 2008 19:50:56 +0200
Local: Sat, Jun 28 2008 1:50 pm
Subject: Re: compress files?

"Christoffer Sawicki" <christoffer.sawi...@gmail.com> writes:
> I don't think it's worth generalizing the current mimeparse.rb code to
> cover both Accept and Accept-Encoding; handling Accept-Encoding is
> much simpler than Accept (mostly because there's no need to deal with
> type specificity).

> Once I extend my Accept-Encoding code to handle * and drop the complex
> regexp I'll ask the list for a review.

Okay, so let's these things stay seperate.

--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoffer Sawicki  
View profile  
 More options Jul 1 2008, 9:34 am
From: "Christoffer Sawicki" <christoffer.sawi...@gmail.com>
Date: Tue, 1 Jul 2008 15:34:25 +0200
Local: Tues, Jul 1 2008 9:34 am
Subject: Re: compress files?
On Sat, Jun 28, 2008 at 6:07 PM, Christoffer Sawicki

<christoffer.sawi...@gmail.com> wrote:
> Once I extend my Accept-Encoding code to handle * and drop the complex
> regexp I'll ask the list for a review.

I finished it yesterday: http://pastie.org/private/mfn66wqhxkjpky1rnvdha

Comments are very welcome - especially on the select_best_encoding tests.

Cheers,
Christoffer Sawicki


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Jul 1 2008, 12:53 pm
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Tue, 01 Jul 2008 18:53:54 +0200
Local: Tues, Jul 1 2008 12:53 pm
Subject: Re: compress files?

"Christoffer Sawicki" <christoffer.sawi...@gmail.com> writes:
> On Sat, Jun 28, 2008 at 6:07 PM, Christoffer Sawicki
> <christoffer.sawi...@gmail.com> wrote:
>> Once I extend my Accept-Encoding code to handle * and drop the complex
>> regexp I'll ask the list for a review.

> I finished it yesterday: http://pastie.org/private/mfn66wqhxkjpky1rnvdha

> Comments are very welcome - especially on the select_best_encoding tests.

Looks good to me, thanks.

--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoffer Sawicki  
View profile  
 More options Jul 1 2008, 4:41 pm
From: "Christoffer Sawicki" <christoffer.sawi...@gmail.com>
Date: Tue, 1 Jul 2008 22:41:50 +0200
Local: Tues, Jul 1 2008 4:41 pm
Subject: Re: compress files?
On Tue, Jul 1, 2008 at 6:53 PM, Christian Neukirchen

<chneukirc...@gmail.com> wrote:
> "Christoffer Sawicki" <christoffer.sawi...@gmail.com> writes:
>> I finished it yesterday: http://pastie.org/private/mfn66wqhxkjpky1rnvdha

>> Comments are very welcome - especially on the select_best_encoding tests.

> Looks good to me, thanks.

Okay, thanks. I pushed the patch to my public repo if anyone wants to fetch it:
http://github.com/Qerub/rack/commit/bd1f55e6729243b08f689a21d7716c208...

Cheers,
Christoffer Sawicki


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Jul 1 2008, 5:01 pm
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Tue, 01 Jul 2008 23:01:16 +0200
Local: Tues, Jul 1 2008 5:01 pm
Subject: Re: compress files?

"Christoffer Sawicki" <christoffer.sawi...@gmail.com> writes:
> On Tue, Jul 1, 2008 at 6:53 PM, Christian Neukirchen
> <chneukirc...@gmail.com> wrote:
>> "Christoffer Sawicki" <christoffer.sawi...@gmail.com> writes:
>>> I finished it yesterday: http://pastie.org/private/mfn66wqhxkjpky1rnvdha

>>> Comments are very welcome - especially on the select_best_encoding tests.

>> Looks good to me, thanks.

> Okay, thanks. I pushed the patch to my public repo if anyone wants to fetch it:
> http://github.com/Qerub/rack/commit/bd1f55e6729243b08f689a21d7716c208...

Is the rest of the gzip stuff good enough for merging now?  (And does
it have tests?)

--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoffer Sawicki  
View profile  
 More options Jul 1 2008, 5:02 pm
From: "Christoffer Sawicki" <christoffer.sawi...@gmail.com>
Date: Tue, 1 Jul 2008 23:02:51 +0200
Local: Tues, Jul 1 2008 5:02 pm
Subject: Re: compress files?
On Tue, Jul 1, 2008 at 11:01 PM, Christian Neukirchen

I'm writing tests at the moment.

Cheers,
Christoffer Sawicki


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoffer Sawicki  
View profile  
 More options Jul 1 2008, 6:24 pm
From: "Christoffer Sawicki" <christoffer.sawi...@gmail.com>
Date: Wed, 2 Jul 2008 00:24:05 +0200
Local: Tues, Jul 1 2008 6:24 pm
Subject: Re: compress files?
On Tue, Jul 1, 2008 at 11:02 PM, Christoffer Sawicki

<christoffer.sawi...@gmail.com> wrote:
> On Tue, Jul 1, 2008 at 11:01 PM, Christian Neukirchen <chneukirc...@gmail.com> wrote:
>> Is the rest of the gzip stuff good enough for merging now?  (And does
>> it have tests?)

> I'm writing tests at the moment.

Okay, here comes Rack::Deflater:
http://github.com/Qerub/rack/commit/56a1e316b69303e642dc5146def52dc93...

Comments are very welcome, as usual.

Cheers,
Christoffer Sawicki


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Jul 3 2008, 5:27 am
From: Christian Neukirchen <chneukirc...@gmail.com>
Date: Thu, 03 Jul 2008 11:27:56 +0200
Local: Thurs, Jul 3 2008 5:27 am
Subject: Re: compress files?

"Christoffer Sawicki" <christoffer.sawi...@gmail.com> writes:
> On Tue, Jul 1, 2008 at 11:02 PM, Christoffer Sawicki
> <christoffer.sawi...@gmail.com> wrote:
>> On Tue, Jul 1, 2008 at 11:01 PM, Christian Neukirchen <chneukirc...@gmail.com> wrote:
>>> Is the rest of the gzip stuff good enough for merging now?  (And does
>>> it have tests?)

>> I'm writing tests at the moment.

> Okay, here comes Rack::Deflater:
> http://github.com/Qerub/rack/commit/56a1e316b69303e642dc5146def52dc93...

> Comments are very welcome, as usual.

Add the missing newline and a useful error message, and I'll merge it.

--
Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spicyj  
View profile  
 More options Jul 4 2008, 4:39 am
From: spicyj <spicyjalap...@gmail.com>
Date: Fri, 4 Jul 2008 01:39:55 -0700 (PDT)
Local: Fri, Jul 4 2008 4:39 am
Subject: Re: compress files?

I've added gzip support: http://github.com/soprano/rack/commit/6d835ba292c5dc2af68784ccf6a0535...

I can't get a full test case, because gzip needs a header for the
mtime of the data, changing the output. Is there a good way to test
the output (maybe gunzipping the output and comparing it to the
original)? I should probably also change it to use the Last-Modified
header as the mtime.

Also, should this be in a separate file? Apache's mod_deflate handles
both deflate and gzip encodings.

~spicyj


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 42   Newer >
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google