Преглед на файлове

add raw response format

alexlcdee преди 8 години
родител
ревизия
b01d28f367
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      src/web/Response.php

+ 3 - 0
src/web/Response.php

@@ -60,6 +60,9 @@ class Response extends \CApplicationComponent
         if ($this->format === static::FORMAT_XML) {
             header('Content-type: application/xml; charset=utf-8');
         }
+        if ($this->format === static::FORMAT_RAW) {
+            header('Content-type: text/plain; charset=utf-8');
+        }
 
         foreach ($this->filters as $filter) {
             if ($filter instanceof ResponseFilterInterface) {