Configuration test xml#104
Conversation
There was a problem hiding this comment.
should we additionally support <header> here, in case somebody only wants to set the reverse proxy ttl for example?
|
@dbu can you rebase the branch to exclude the changes from the previous PR ? |
|
there we go, rebased. |
There was a problem hiding this comment.
made them explicit. and testing that all can be set.
we had an explicit list what we handled in CacheControlSubscriber anyways.
|
you should add an example with multiple values for the Vary header as well. I don't see how you expect it to work for XML currently. Do you plan to make it a single tag with comma-delimited values ? |
|
@dbu |
There was a problem hiding this comment.
added a second Vary header. it does work - do you think its wrong like this?
There was a problem hiding this comment.
well, given that there is no ->fixXmlConfig() call, I find it weird that it works for both the 1 and >=2 cases. It may be related to the string normalization case though
There was a problem hiding this comment.
would the proper fix be to add a fixXmlConfig('vary') then?
There was a problem hiding this comment.
well not fix as it already works, but the proper setup to be sure it continues working.
There was a problem hiding this comment.
@stof would the proper thing to avoid regressions be to add a fixXmlConfig('vary')?
There was a problem hiding this comment.
nope. fixXmlConfig('vary') would turn vary into varys (or whatever other plural you define), so it would even make thing worse by breaking YAML configs as well.
I think the current setup works for the case of a single <vary> child because of the ifString() normalization exploding the string.
There was a problem hiding this comment.
well, it even works with multiple <vary>, as the test demonstrates. if i did fixXmlConfig('vary', 'vary') we get no unwanted pluralization... would that be the thing?
There was a problem hiding this comment.
hm, if i add fixXmlConfig('vary', 'vary') i get no error but the vary settings disappear in xml config (and only there). shall i just merge and hope it continues working?
There was a problem hiding this comment.
thanks to the string normalization, it will work properly, so you can merge.
but make sure you have a test using a single Vary and another test using multiple Vary headers, to be sure that future changes don't break the XML support there
|
OK @dbu, I'm merging this one as it looks good. |
|
thanks. i will follow up with a variant to test the |
follow-up for #103 - there are some issues with xml that i hope somebody can help me with.
until #103 is merged, this will also show all changes of #103