Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix header handling in mochiweb response. #21

wants to merge 1 commit into


None yet
3 participants

davidw commented Mar 27, 2013

Fixes: #20


evanmiller commented Mar 27, 2013

I agree with this change, but note that the other bridge modules will need to be updated as well in order to present a consistent interface. It looks like the modules for Cowboy and Yaws also set a 10 year Expires header.


choptastic commented Mar 29, 2013

Thanks David, I've got your commit pulled onto my development repo, and I've got a handful of refactoring tweaks for this (as well as working them into the other backend bridges, as Evan mentioned).

In particular, I'm adding an environment variable for a default expires header (only to be added if it doesn't already exist).

But this will make it onto mainline master in the next week or so.

Thanks again!


evanmiller commented Apr 24, 2013

Any updates on this?


choptastic commented Apr 24, 2013

Thanks for the poke.

This has been merged into mainline with a few tweaks. as described here: 3c255e6

Basically, it will check for the expires header or a cache-control header, and if neither are found, it will look for the simple_bridge application variable default_expires.

There are three possibly values for this variable:

  • The atom immediate - static requests will expire immediately.
  • An integer - static requests expire in that many seconds
  • The tuple {Unit, Integer} - where Unit is any of the following atoms: years, months, weeks, days, hours, minutes, or seconds. For example: {days, 10} means "expire in 10 days".
  • If the value is anything else or undefined, it defaults to its previous value of 10 years.

I hope that helps. This has been extended to the other backends as well.

@choptastic choptastic closed this Apr 24, 2013


evanmiller commented Apr 24, 2013

Thanks, Jesse.

That commit says work in progress -- does master work as of the latest commits?


choptastic commented Apr 24, 2013

I believe it does work, but I'm testing it now.

On Wed, Apr 24, 2013 at 5:35 PM, Evan Miller notifications@github.comwrote:

Thanks, Jesse.

That commit says work in progress -- does master work as of the latest

Reply to this email directly or view it on GitHubhttps://github.com/nitrogen/simple_bridge/pull/21#issuecomment-16976028

Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm


choptastic commented Apr 25, 2013

master branch is good to go. Let me know if you run into any problems.


evanmiller commented Apr 25, 2013

Thanks Jesse!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment