-
Notifications
You must be signed in to change notification settings - Fork 84
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
Adding allow header makes validation fail #80
Comments
Fixes cloudevents#80 Signed-off-by: Jon Skeet <[email protected]>
Fixes #80 Signed-off-by: Jon Skeet <[email protected]>
Great, thanks for the fix. |
I seem to be unable to find how to do validation in the newest versions... I see this code in the 1.x versions, but not after... how do I validate? |
@sandromastronardi: Please could you file a new issue, with details of what kind of validation you want to do where? (It's not directly related to this bug.) |
Hi @jskeet, Thanks for the quick response, but how is it not related? As i cannot find the code you changed in the releases, has the code ever been released? |
Because one is "this code should work and doesn't" (which was fixed by #145), the other is a question of "what code should I write to validate a CloudEvent?".
Yes, there have been multiple releases of the various CloudNative.CloudEvents packages since this issue was closed. (This change would have been in CloudNative.CloudEvents.) The commit history shows all the changes, including releases. I feel I may be missing what you're asking though... |
Hi @jskeet , I did see the fix commit, but in 1.3 it was not fixed yet, and in 2.0 releases its not at all there... so I have the feeling your fix has never made it to a release? |
New issue: #243 |
I think I was confused by you not being specific about what you mean by "how to do validation". Are you specifically interested in webhook validation, not CloudEvent validation? That information would have been really helpful. Now I have a bit more context, I'll do some digging. (As I say though,. you can see all the changes in the code - everything is released via GitHub actions, so if we've removed webhook validation, that'll be in the history.) |
Ah, sorry about that, as the ticket was about the webhook validation I assumed it was clear, my bad. I didn't know about any other validation. |
sdk-csharp/src/CloudNative.CloudEvents/HttpClientExtension.cs
Line 127 in b494765
When this code is adding the Allow header I get this response:
Misused header name. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.
It appears that you must add it to .Content.Headers.Add("Allow", "POST");
source: https://stackoverflow.com/questions/14286436/why-i-cannot-set-allow-in-http-response-header
Without this, I can't use this in an azure function in .net core 3.1
not sure if this is a bug in other versions, I assume it behaves this way in all .NET versions?
The text was updated successfully, but these errors were encountered: