-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Configure headers in response setup #153
base: master
Are you sure you want to change the base?
Conversation
I am not sure how to fix tests. I tested it in my app and it should work properly. |
c23f7b6
to
b834b0d
Compare
8fd7f28
to
51a304f
Compare
1718bd2
to
9b138d0
Compare
@dg Ready |
I'm afraid this is a BC break, which is not suitable for the patch version. |
I thinked about it too. It should be BC break only in case that someone depends on fact that headers are sent and Response is not instantiated by user's app. nette\application users are ok, only users of standalone nette/http should be affected and just in case they send response incorrectly without Response class. As far as I know, Apitte is the only http-related nette extension, which is (almost) completely separated from nette/http and it will be not affected by this change until next version. Do you know an other case which could be problematic? This PR is non-blocking for me, so it could wait. Just an architectural problem. |
Maybe a compatibility-mode, which would be enabled by default? It would just initialize service in initialize() method, if enabled. Something like this |
In case it is non-blocking for you, I will postpone it to 3.1. |
ok, thanks |
f843ac1
to
a472b8d
Compare
8b44821
to
052190c
Compare
b1f6bb5
to
518f8e5
Compare
da24b94
to
540335c
Compare
e7c7e2d
to
bf945f3
Compare
9a14e6e
to
a20fb8f
Compare
55488bd
to
2042d2e
Compare
4960652
to
5e67add
Compare
689f4ae
to
33aae19
Compare
09923de
to
02ae846
Compare
Moved headers configuration from initialize() method of DIC to Response service setup.
Useful for applications with multiple http layer implementations (we use psr-7 in Apitte). It should prevent mixing headers from nette/http if not used for current request