Commit Graph

33 Commits

Author SHA1 Message Date
Johannes Meyer b93dc06f5b ActionController: Let the repsonse itself set its headers
The only header that is now set by the ActionController is X-Icinga-Title,
all others are delegated to Icinga\Web\Response.
2017-07-13 12:56:03 +02:00
Johannes Meyer e75bfbc197 Response: Add ;charset=UTF-8 to the default content type
resolves #13117
2016-11-15 13:30:16 +01:00
Johannes Meyer 0ef81a2e0b Response: Use a constant for the default content type
There is already setHeader() to adjust this dynamically.

refs #12161
2016-11-09 11:38:04 +01:00
Noah Hilverling 888ac98007 Response: Improve documentation for method getHeader
refs #12161
2016-10-18 11:07:24 +02:00
Noah Hilverling e5c736aab4 Response: Use method getHeader to check if Content-Type is set already
refs #12161
2016-10-18 10:13:58 +02:00
Noah Hilverling f95c789353 Response: Add method getHeader
refs #12161
2016-10-18 09:58:33 +02:00
Noah Hilverling c927c32442 Response: Only set header Content-Type in method prepare if not already set
refs #12161
2016-10-17 16:34:07 +02:00
Noah Hilverling c3276d4341 Response: Remove empty line after method getContentType
refs #12161
2016-10-17 16:03:33 +02:00
Noah Hilverling af5c578adf Response: Set header Content-Type for every response by default
refs #12161
2016-10-14 16:16:13 +02:00
Noah Hilverling 7cf6b860b5 Response: Add contentType attribute
refs #12161
2016-10-14 16:12:47 +02:00
Alexander A. Klimov bf3cfda209 Response: rename setMetaDataFrom() to copyMetaDataFrom()
refs #12583
2016-10-11 10:45:15 +02:00
Alexander A. Klimov 4d16656100 Preserve status code and headers in JSON responses
refs #12583
2016-09-27 13:26:20 +02:00
Alexander A. Klimov 474803fee4 Change all license headers to only reflect a file's year of creation
refs #11000
2016-02-08 15:41:00 +01:00
Eric Lippmann 78c1e17c20 lib/Response: Allow to control the auto-refresh interval 2016-01-27 09:14:11 +01:00
Eric Lippmann 2d5bd3085f Don't send cookies on API requests 2015-12-10 13:34:54 +01:00
Eric Lippmann 59b540cc12 lib: Implement cookie handling in Response
Cookies set via Response::setCookie() or Response::getCookies()::add() will be automatically sent to client.
2015-11-27 15:51:38 +01:00
Eric Lippmann 8fb9d94f46 lib: Allow to control reload CSS header in Response
Whenever the theme is switched, client side script code has to be instructed to reload CSS.

refs #10705
2015-11-27 15:44:40 +01:00
Eric Lippmann 25abc16e15 lib: Replace Repsonse::sendJson() w/ Response::json()
refs #9606
2015-09-07 13:24:21 +02:00
Eric Lippmann 1c5a784022 lib: Move Request::sendJson() to Response::sendJson()
refs #9606
2015-08-20 16:05:45 +02:00
Eric Lippmann 9060e8a034 lib: Only call Icinga::app()->getRequest() for getting the request outside of a controller
Saves a call to getFrontController().

refs #9660
2015-07-30 14:02:44 +02:00
Eric Lippmann 432efcb089 lib: Handle Response::setRerenderLayout() correctly
The header is different if it's not a redirect.

refs #9660
2015-07-29 15:08:36 +02:00
Eric Lippmann aaae7e03b4 lib: Introduce Response::setRerenderLayout()
Instead of handling response headers based on flags in our controllers, this should happen in the request for usage w/o controllers.

refs #9660
2015-07-29 14:39:45 +02:00
Eric Lippmann 91720810cc lib: Document Response::redirectAndExit()
refs #9660
2015-07-29 14:22:45 +02:00
Eric Lippmann a31c799043 lib: Introduce Response::getRequest()
refs #9660
2015-07-29 14:20:39 +02:00
Eric Lippmann 6bae2e0a53 Note that our license is GPL v2 or any later version in our license header instead of pointing to the license's URL 2015-02-04 10:52:27 +01:00
Eric Lippmann 5b4fab0750 Add license header
This time without syntax errors hopefully :)
2015-02-03 16:27:59 +01:00
Eric Lippmann 5fa2e3cfdc Revert "Add license header"
This reverts commit 338d067aba.
2015-02-03 16:16:26 +01:00
Eric Lippmann 338d067aba Add license header
fixes #7788
2015-02-03 15:51:04 +01:00
Johannes Meyer c00dbf9f46 Write session on response
There should not be any necessity to write the session once changes are
being made to it. We now track whether changes were made and write
the session when responding to the user's request if so.
2014-09-24 10:46:35 +02:00
Thomas Gelf 93777ac15e Web/Response: use & to encode XHR redirection URLs 2014-09-12 09:28:11 +02:00
Johannes Meyer 3105c2059e Remove license headers from all files
refs #6309
2014-07-15 13:43:52 +02:00
Thomas Gelf 3cfdf4c977 Web\Response: add redirection function
The response now provides redirectAndExit(). One more step to clean up
our action controller. Please not that this is still unused right now.
2014-07-04 12:35:33 +02:00
Thomas Gelf b7fc0b67a8 Web/controllers: use own Request/Response objects
* introduces Icinga\Web\Response
* uses ModuleActionController where necessary
* no module translationDomain voodoo in base ActionController
2014-06-22 13:49:21 +02:00