-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rack: Accept generic X-Request-Start header #832
Rack: Accept generic X-Request-Start header #832
Conversation
This patch make the `t=` portion of the X-Request-Start header optional so that the request queuing time can be supported on platforms like Heroku.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR, and welcome @JamesHarker!
I noticed that Heroku's documentation mentions that time is represented in milliseconds.
Our current implementation calls Time.at(time_value)
, which expects time in seconds, which is what nginx
uses.
To handle Heroku headers correctly, a conversion has to be made here.
Apologies, completely overlooked that. I'll update the PR 👍 |
Add support for Apache as well
@marcotc I've updated the PR as requested. I've also added support for Apache as apparently the default there is something different again 🙄 I've added some more tests but I'm not sure if this if this is OTT? Happy to amend if needs be. I think I've also forked (and have the PR merging into) the wrong branch - would you like me to change this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @JamesHarker!
The apache support is super welcome too, thank you.
I left a few more comments, but it's looking pretty close to .
Co-Authored-By: Marco Costa <mmarcottulio@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @JamesHarker for your responsiveness and a solid PR 🎉
Only a few housekeeping things left to do: address Rubocop issues and sync with master branch. |
Co-Authored-By: Marco Costa <mmarcottulio@gmail.com>
Master merged back in so I think we're good go? 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All ✅, thank you!
This patch makes the
t=
portion of the X-Request-Start header optional so that the request queuing time can be supported on platforms like Heroku.