Skip to content
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

Use X-Request-ID header as request id if provided by client #28144

Merged
merged 3 commits into from
Jun 22, 2017

Conversation

butonic
Copy link
Member

@butonic butonic commented Jun 16, 2017

If clients send a request id we can identify the client request also in the apache and owncloud logs.
for apache the log rule needs to log the X-Request-ID environment variable

  • tests, but I need to run

related:

also see

@butonic
Copy link
Member Author

butonic commented Jun 16, 2017

cc @jturcotte regarding the X-Request-ID header

@butonic butonic changed the title use X-Request-ID header as request if provided by client [WIP] use X-Request-ID header as request if provided by client Jun 16, 2017
@butonic butonic changed the title [WIP] use X-Request-ID header as request if provided by client [WIP] use X-Request-ID header as request id if provided by client Jun 16, 2017
@butonic
Copy link
Member Author

butonic commented Jun 16, 2017

I added a few more chars to allow writing timestamps. But I don't want to allow ", ', % or \ because the former two might interefere with the quotes in the JSON log. % might introduce url encodings and \ is the escape char ... comments welcome.

Also ... while HEROKU just replaces invalid request IDs I want to fail early and hard ... which is why I throw the exception. Opinions?

@DeepDiver1975 DeepDiver1975 added this to the 10.1 milestone Jun 19, 2017
@DeepDiver1975 DeepDiver1975 self-requested a review June 19, 2017 08:28
@DeepDiver1975
Copy link
Member

@butonic please fix le tests

bildschirmfoto von 2017-06-19 10-30-04

Copy link
Member

@DeepDiver1975 DeepDiver1975 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix le tests

@butonic
Copy link
Member Author

butonic commented Jun 20, 2017

@DeepDiver1975 I fixed le tests

@butonic butonic changed the title [WIP] use X-Request-ID header as request id if provided by client Use X-Request-ID header as request id if provided by client Jun 22, 2017
@michaelstingl
Copy link

@butonic Backport to 10.0.x to release also with 10.0.4?

@PVince81
Copy link
Contributor

PVince81 commented Nov 3, 2017

@butonic please backport

DeepDiver1975 pushed a commit that referenced this pull request Nov 3, 2017
#28144)

* use X-Request-ID header if provided by client

* allow a few more chars to enable timestamps, add tests

* fix regex and update exception message
@PVince81
Copy link
Contributor

PVince81 commented Nov 6, 2017

stable10: #29434

@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants