-
Notifications
You must be signed in to change notification settings - Fork 259
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
A cookie with a key but no value breaks a GET /functionname #88
Comments
I forgot versions; R 3.2.0, plumber 0.3.1 and the github head here's a counter we used for testing:
|
@trestletech Any comments on this issue? We are still using incognito window at this point. |
Hey there. Thanks for reporting this. I don't quite understand the format that you posted for the cookie in the initial example; can you clarify? If you can send over the exact format of the cookie header that's failing (you can copy this out of the request headers in Chrome where things are failing) I should be able to dig in. |
sure thing, thank you for the response. so i'm gonna use a cookies.txt format, the netscape style for this example. the field breakdown is as follows, (i'm grabbing from stackexchange here):
here's a section of this exported cookies.txt format: .domain.com TRUE / FALSE 1626207978 km_ai rjmb%40domain.com if you had it in a csv-style, it'd look like this: .domain.com,TRUE,/,FALSE,1626207978,km_ai,rjmb%40domain.com so 'km_ai' and 'km_ni' are fine. 'km_uq' is not. I am not strong in R, but in https://github.com/trestletech/plumber/blob/master/R/cookie-parser.R it looks like you're splitting the names and cookies into two seperate values and then zipping them together again:
if the names and values don't have the same number of members when you merge them, that seems to be a likely candidate to produce our error. again, thanks for your time. |
Totally. Yeah that's the code that I'm looking at. The reason I ask for the header as it comes from Chrome is that I need to see the raw text that's being sent over in the header to understand where the parsing is failing. Do you mind copying and pasting the header out of the Chrome inspector? I'm not sure if an empty cookie will be |
sure thing. the relevent section from above:
the full text:
|
Should be fixed on master now. Let me know if it's still giving you trouble. |
works now, thanks for the update! |
using plumber (both latest release and the development version), we had an issue with a GET that'd return a 500. after some wireshark and a lot of wget iterations, this entry in my cookies.txt seems to have been the cause:
.domain.com TRUE / FALSE 1626207978 km_uq
which has a key but no value. compared to:
.domain.com TRUE / FALSE 1626131221 km_lv x
which works.
we were seeing that chrome (where we got these cookies) was failing but incognito mode wasn't failing. if there's anything further I can provide, just let me know.
The text was updated successfully, but these errors were encountered: