Giter VIP home page Giter VIP logo

Comments (6)

dougwilson avatar dougwilson commented on May 7, 2024

I'm not sure, because your response is missing the Vary: Accept-Encoding header this module adds. Can you display both the request and response headers with curl and more code, perhaps enough where we could run it?

from compression.

tute avatar tute commented on May 7, 2024

Thanks for your quick response. HTTP headers detail:

$ curl -v -I -H 'Accept-Encoding: gzip,deflate' localhost:4200/assets/vendor.js
* Adding handle: conn: 0x7fe999804000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fe999804000) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 4200 (#0)
*   Trying ::1...
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 4200 (#0)
> HEAD /assets/vendor.js HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:4200
> Accept: */*
> Accept-Encoding: gzip,deflate
> 
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< X-Powered-By: Express
X-Powered-By: Express
< Last-Modified: Sun, 06 Jul 2014 04:11:13 GMT
Last-Modified: Sun, 06 Jul 2014 04:11:13 GMT
< Cache-Control: private, max-age=0, must-revalidate
Cache-Control: private, max-age=0, must-revalidate
< Content-Length: 2436528
Content-Length: 2436528
< Content-Type: application/javascript
Content-Type: application/javascript
< Date: Sun, 06 Jul 2014 04:41:13 GMT
Date: Sun, 06 Jul 2014 04:41:13 GMT
< Connection: keep-alive
Connection: keep-alive

< 
* Connection #0 to host localhost left intact

I'm trying to isolate it in a runnable app.

from compression.

dougwilson avatar dougwilson commented on May 7, 2024

Ah. HEAD responses are not compressed, because they do not have content to compress.

from compression.

tute avatar tute commented on May 7, 2024

Bad example, changed to a GET and behaves the same. Anyhow it does seem like an issue in my app, as it seems that index.js is not the server that loads and I should edit. Thanks for your input!

from compression.

dougwilson avatar dougwilson commented on May 7, 2024

Like I said, the Vary: Accept-Encoding is not in your response headers, which is added by this module, so there is something wrong with your app's setup. I cannot tell you more without having code to run from you, though.

from compression.

tute avatar tute commented on May 7, 2024

For the record,

module.exports = function(emberCLIMiddleware) {
   var app = express();
   app.use(compression())

should have been:

module.exports = function(emberCLIMiddleware) {
   var app = express();
   emberCLIMiddleware.use(compression())

Thanks for your help, sorry to bother!

from compression.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.