Skip to content

[HttpKernel] Move duplicated logic from Esi/Ssi to an AbstractSurrogate #18833

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

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented May 21, 2016

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

This moves the not-specific logic from the Esi/Ssi classes into an abstract class that they extend.
This class (AbstractSurrogate) can be extended by any class implementing a Surrogate-Capability to the Request+Response instances, as Esi/Ssi do for ESI/SSI capabilities.

@chalasr chalasr force-pushed the patch_abstract_surrogate branch 2 times, most recently from 6b3835c to fb6860c Compare May 22, 2016 00:08
@chalasr chalasr changed the title Move duplicated logic from Esi/Ssi to an AbstractSurrogate [HttpKernel] Move duplicated logic from Esi/Ssi to an AbstractSurrogate May 22, 2016
@chalasr chalasr force-pushed the patch_abstract_surrogate branch 4 times, most recently from 1e8040d to cd802cf Compare May 22, 2016 11:56
@chalasr chalasr force-pushed the patch_abstract_surrogate branch from cd802cf to e24b1bd Compare May 23, 2016 11:38
throw $e;
}
}
// remove SSI/1.0 from the Surrogate-Control header
Copy link
Member

Choose a reason for hiding this comment

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

Comment looks wrong.

Fabbot fixes

Move duplicated logic from Esi/Ssi::process in AbstractSurrogate::removeFromControl

Fabbot fixes

Fix comment
@chalasr chalasr force-pushed the patch_abstract_surrogate branch from e24b1bd to c5dc50d Compare June 15, 2016 10:40
@fabpot
Copy link
Member

fabpot commented Jun 15, 2016

Thank you @chalasr.

@fabpot fabpot merged commit c5dc50d into symfony:master Jun 15, 2016
fabpot added a commit that referenced this pull request Jun 15, 2016
…AbstractSurrogate (chalasr)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[HttpKernel] Move duplicated logic from Esi/Ssi to an AbstractSurrogate

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations?| no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

c5dc50d Move duplicated logic from Esi/Ssi to an AbstractSurrogate
@chalasr chalasr deleted the patch_abstract_surrogate branch June 15, 2016 10:45
* @author Fabien Potencier <fabien@symfony.com>
* @author Robin Chalas <robin.chalas@gmail.com>
*/
abstract class AbstractSurrogate implements SurrogateInterface
Copy link
Contributor

@Tobion Tobion Jun 15, 2016

Choose a reason for hiding this comment

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

this should be either marked as @internal or the PR is a new feature in contrast to the PR header (which means a use-case should be given).

Copy link
Member Author

Choose a reason for hiding this comment

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

@Tobion I marked it as a new feature in the header (as made in the merge commit) & added a description.

@fabpot fabpot mentioned this pull request Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants