-
Notifications
You must be signed in to change notification settings - Fork 32
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
add conditional header split #189
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #189 +/- ##
==========================================
+ Coverage 94.86% 94.97% +0.10%
==========================================
Files 28 28
Lines 1364 1392 +28
==========================================
+ Hits 1294 1322 +28
Misses 70 70
Continue to review full report at Codecov.
|
Code is ok. Need tests. |
Agree on the tests, do you know how we can test this? |
I think it worth to make list of splittable headers public/ not hardcoded. So it is possible to modify it before backend starts. |
With the latest commits, the user can specify the headers to split, the entry point for that is the A quick example would look like this:
Now we can test it from curl with
|
Any updates on this? Are there any further tasks that need to be done before we can merge this? |
* fix IMS header for wrongfully cut date * allow multiple INM values * add If-Match Header * add If-Unmodified-Since Header * add to documentation Co-authored-by: David Zimmermann-Kollenda <david.zimmermann-kollenda@genre.com>
* fix ETag encoding problem, cached are text/plain mime * fix documentation Co-authored-by: David Zimmermann-Kollenda <david.zimmermann-kollenda@genre.com>
@DavZim I've pushed some updates which move split header to standard R options. Also I'm thinking where to put documentation for such things. Suggestions? |
Do you mean long form of documentation such as a vignette or shorter: a "chapter" in the readme? The functionality itself is documented in Backend, right? |
Short paragraph. New "split headers" option in theory should hold same logic for all backends (if for example we add |
This PR adds a first (discussion) version to #187.
It implements an unordered set in cpp which keeps track of all headers which can be split (I didnt find a comprehensive list nor extensive documentation for each header which lists if it can have multiple elements, instead I looked through multiple examples (see comment in code) and took the ones which have examples with multiple elements).
As mentioned in the issue, I found no easy way to test this properly, as
app$process_request()
does not callparse_headers()
. Instead I used the manual approach:and then using CURL I test the following:
which results in the following output in the logs of the Rsession:
As we can see, the
Accept
header is split, but theIf-Modified-Since
header is not split.Let me know what you think about this!