-
Notifications
You must be signed in to change notification settings - Fork 184
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
HttpRequestData.Cookies is Empty #694
Comments
Thanks for catching the white-space bug! Repro'd it and will be putting in a fix. Could you provide a little more info about your environment @jrhodnik (like core tools version)? Or see if the sample below works for you? I just tested it with the latest branch and was able to grab from the Cookies field.
|
Thank you for your response, glad to hear about the bug fix. Below is the version I'm running on. I was able to reproduce the cookie issue with your sample above. Was the aforementioned fix not published to 3x yet?
Thanks! -John |
@jrhodnik if you update the worker to version 1.6.0 it should work now |
When using an HTTP triggered function, it appears that
HttpRequestData.Cookies
is empty. This appears to be an issue that was previously reported and resolved in #466 though I am still not seeing cookies despite them being present inHeaders
. I am currently using version 1.5.2.As a workaround I copied
ToHttpCookie
locally to my project to keep moving and may have noticed another bug.When splitting the cookies out of the full cookie string, cookie names are not trimmed and contain leading whitespace if it was included in the string.
Example:
Browser sends the following cookie header:
another-token=aasdfasdf; some-token=asdfasdf
The dict key for
some-token
will in fact be[space]some-token
.Note that when I set the cookie I did not include a leading whitespace. The browser (Chrome in this case) seems to separate multiple cookies with
;
rather than simply;
.The text was updated successfully, but these errors were encountered: