Skip to content
Browse files

Upgraded clydephp to latest commit

  • Loading branch information...
1 parent 83e4ec8 commit a203c72656d4a96f8dea2c9b487c91be44641814 @ilmich committed
Showing with 15 additions and 8 deletions.
  1. +4 −0 includes/http/class.httprequest.php
  2. +11 −8 includes/http/class.httpresponse.php
View
4 includes/http/class.httprequest.php
@@ -185,6 +185,10 @@ public function getCompressionEncoding() {
return $encoding;
}
+
+ public function getEtag() {
+ return $this->getHeader('If-None-Match');
+ }
/**
* Return Raw HTTP Request (note: This is incomplete)
View
19 includes/http/class.httpresponse.php
@@ -19,8 +19,7 @@ public function send() {
foreach ($this->_headers as $header) {
header($header);
- }
-
+ }
echo $this->_body;
}
@@ -62,23 +61,27 @@ public function setStatus($status) {
$status_header = 'HTTP/1.1 ' . $status . ' ' . $this->getStatusCodeMessage($status);
// set the status
- $this->addRawHeader($status_header);
-
+ $this->addRawHeader($status_header);
return $this;
}
public function setMimeType($mime) {
if (is_null($mime) || !is_string($mime)) {
throw new ClydePhpException('MimeType must be a not null string');
- }
-
- $this->_mimetype = $mime;
-
+ }
+ $this->_mimetype = $mime;
return $this;
}
public function getMimeType() {
return $this->_mimetype;
+ }
+
+ public function setEtag($etag=null) {
+ if (!is_null($etag)) {
+ $this->addHeader('Etag',$etag);
+ }
+ return $this;
}
public function getStatusCodeMessage($status) {

0 comments on commit a203c72

Please sign in to comment.
Something went wrong with that request. Please try again.