basecamp / thruster

MIT License
672 stars 16 forks source link

CSS files empty #8

Closed phoet closed 3 months ago

phoet commented 3 months ago

Adding thruster to my rails app will deliver everything but CSS files, those are empty. Did I miss anything obvious from the readme? I thought thruster would be a zero config drop-in with puma?

mtimofiiv commented 3 months ago

Same issue - also with js files, so perhaps all static files are affected. Logs from server read like so (I removed some stuff like user agent):

{
  "level":"INFO",
  "msg":"Request",
  "path":"/assets/controllers/index-2db729dddcc5b979110e98de4b6720f83f91a123172e87281d5a58410fc43806.js",
  "status":200,
  "dur":2,
  "method":"GET",
  "req_content_length":0,
  "req_content_type":"",
  "resp_content_length":0,
  "resp_content_type":"application/javascript",
  "cache":"miss",
  "query":""
}

There does seem to be a corresponding file at ./public/assets/controllers/index-2db729dddcc5b979110e98de4b6720f83f91a123172e87281d5a58410fc43806.js and it has content inside of it.

kevinmcconnell commented 3 months ago

@phoet @mtimofiiv thanks for letting me know! It looks like there's a bug that's causing the X-Sendfile transfers to fail in some situations. I'll get this fixed shortly.

In the meantime could you try running with X_SENDFILE_ENABLED=false? I think that will sidestep the problem until this is fixed.

phoet commented 3 months ago

@kevinmcconnell thanks for the feedback. using X_SENDFILE_ENABLED=false might circumvent the issue, but it's pointless since that's why i actually tried thruster...

kevinmcconnell commented 3 months ago

@phoet fair enough! I expect to have a fix out on Monday, sorry for the inconvenience in the meantime.

kevinmcconnell commented 3 months ago

@phoet @mtimofiiv this should be fixed now in the latest gem version (v0.1.1).

Thanks again for reporting it!

mtimofiiv commented 3 months ago

Thanks so much @kevinmcconnell for your quick response + fix. Will test this today and report back if anything goes wrong.

phoet commented 3 months ago

👍 worked fine and app loads in deed much snappier now https://www.weg.li/