Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Configuration test xml#104

Merged
stof merged 4 commits into
masterfrom
configuration-test-xml
Jul 18, 2014
Merged

Configuration test xml#104
stof merged 4 commits into
masterfrom
configuration-test-xml

Conversation

@dbu
Copy link
Copy Markdown
Contributor

@dbu dbu commented Jul 11, 2014

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we additionally support <header> here, in case somebody only wants to set the reverse proxy ttl for example?

@stof
Copy link
Copy Markdown
Member

stof commented Jul 11, 2014

@dbu can you rebase the branch to exclude the changes from the previous PR ?

@dbu
Copy link
Copy Markdown
Contributor Author

dbu commented Jul 11, 2014

there we go, rebased.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made them explicit. and testing that all can be set.

we had an explicit list what we handled in CacheControlSubscriber anyways.

@stof
Copy link
Copy Markdown
Member

stof commented Jul 11, 2014

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 ?

@stof
Copy link
Copy Markdown
Member

stof commented Jul 11, 2014

@dbu >fixXmlConfig('route') on line 356 is the wrong place. It should be inside the rules prototype, not in rules itself

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a second Vary header. it does work - do you think its wrong like this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would the proper fix be to add a fixXmlConfig('vary') then?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well not fix as it already works, but the proper setup to be sure it continues working.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof would the proper thing to avoid regressions be to add a fixXmlConfig('vary')?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@stof
Copy link
Copy Markdown
Member

stof commented Jul 18, 2014

OK @dbu, I'm merging this one as it looks good.

stof added a commit that referenced this pull request Jul 18, 2014
@stof stof merged commit 6684048 into master Jul 18, 2014
@stof stof deleted the configuration-test-xml branch July 18, 2014 21:04
@stof stof mentioned this pull request Jul 18, 2014
@dbu
Copy link
Copy Markdown
Contributor Author

dbu commented Jul 20, 2014

thanks. i will follow up with a variant to test the vary parsing variant as per #104 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants