-
Notifications
You must be signed in to change notification settings - Fork 79
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
User defined cookies / headers are overwritten #405
Comments
Spoke with @jeroen offline and
If we go with option 1 (which feels cleaner and may be more general across http handlers), then perhaps we should document that headers set via At this point, I'm not sure whether this is a bug or feature request, but basically
😄 |
It seems like the right solution would involve us building up a list of options (overlaying user-specified options as appropriate) and then passing everything into Alternatively, the cheap way out would be to add options like |
Brilliant! That sounds like a win to me! 😄 Is it worth my investigating the other handlers as well? Ideally there'd be a way to set headers / cookies no matter which HTTP handler is chosen. |
It looks like (deprecated) Line 78 in fef0bf6
Plain |
Implements new `rsconnect.http.headers` and `rsconnect.http.cookies` options which allow you to set extra arbitrary additional headers/cookies on each request. Their use is documented in the new `vignette("custom-http")`. Includes some minor refactoring of cookies code and tests. Fixes #405.
For the purposes of my example, I have only tested with
libcurl
. However, hopefully we can remedy this issue with the other download handlers as well.Straight invocation of
libcurl
:Created on 2020-02-14 by the reprex package (v0.3.0)
As you can see, the
httpheader
setting is not additive, but overwrites. It even overwrites previously specifiedcookie
s. As a result, when we add the user's options here:rsconnect/R/http-libcurl.R
Lines 9 to 12 in fef0bf6
And then don't incorporate them later:
rsconnect/R/http-libcurl.R
Line 121 in fef0bf6
Everything the user has specified gets overwritten.
Are there any other workarounds to specify arbitrary user-defined headers / cookies via
.rsconnect_profile
? This is something that we have a few customers stuck at when deploying to RStudio Connect (specifically when headers / cookies need to be specified to satisfy a proxy).The text was updated successfully, but these errors were encountered: