All pastes #359162 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-16 16:12 UTC
rendered paste body
Index: src/response/AgaviWebResponse.class.php
===================================================================
--- src/response/AgaviWebResponse.class.php	(revision 1705)
+++ src/response/AgaviWebResponse.class.php	(working copy)
@@ -528,16 +528,6 @@
 			$this->setHttpHeader('Content-Length', $contentSize);
 		}
 		
-		// send headers
-		foreach($this->httpHeaders as $name => $values) {
-			foreach($values as $key => $value) {
-				if($key == 0) {
-					header($name . ': ' . $value);
-				} else {
-					header($name . ': ' . $value, false);
-				}
-			}
-		}
 		
 		$routing = $this->context->getRouting(); 
 		if($routing instanceof AgaviWebRouting) {
@@ -570,6 +560,17 @@
 				setcookie($name, $values['value'], $expire, $values['path'], $values['domain'], $values['secure']);
 			}
 		}
+		
+		// send headers
+		foreach($this->httpHeaders as $name => $values) {
+			foreach($values as $key => $value) {
+				if($key == 0) {
+					header($name . ': ' . $value);
+				} else {
+					header($name . ': ' . $value, false);
+				}
+			}
+		}
 	}
 
 	/**