x-correlator with no value (empty / null) #366
Replies: 4 comments 1 reply
-
Hi @Toshi - HTTP applies the same syntax rule for all header field content, and this allows empty header fields, although only the definitions of This means that sending an empty HTTP header is not "breaking HTTP", and because of that I suspect common HTTP libraries will not throw an exception if an empty header field is sent. So to your question:
I think 'yes', and I don't believe the server should include |
Beta Was this translation helpful? Give feedback.
-
Hi @ToshiWakayama-KDDI , I believe it ultimately depends on how the provider ensures proper traceability. If the x-correlator header is missing or empty, we can simply generate a new traceable ID on our side to keep everything traceable. This ID helps us with logging and troubleshooting. Before sending the response back, we can map this generated ID in the x-correlator header so the consumer can use it for their tracking as well. |
Beta Was this translation helpful? Give feedback.
-
Changes introduced in this PR #373 should eliminate empty x-correlator (it can be discarded as not following the pattern) |
Beta Was this translation helpful? Give feedback.
-
As discussed yesterday within the TSC I see a challenge with the introduction of the pattern in #373. API Clients which have added the the x-correlator header (as it is listed in the API definitions) but intentionally or unintentionally left it empty or set it to an empty string (
My view is that API Provider should be liberal and accept NULL (no value) or empty strings within the x-correlator and treat them as if the header was not present. Within the x-correlator pattern we need to accept also strings with zero-lengths for that. |
Beta Was this translation helpful? Give feedback.
-
Dear CAMARA Commonalities specialists,
When the API Consumer includes the "x-correlator" header in the request, if it does not have any value (empty, null or something like that), how the API Provider should handle it? It is appropriate to regard a no-value x-correlator as no x-correlator header existing?
Many thanks,
Toshi
Beta Was this translation helpful? Give feedback.
All reactions