X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_response_object.c;h=28d662ae6cc9d925a2bfb4179d9ff66ac3c5d7ac;hp=1f2b58001cc8507d79e02ad7a4ddfe64801f7035;hb=0d84055a1b044e267dc52ace7b7ecfd3ede4fd3c;hpb=05fd3f5b6e302959111b33ea8b259d7ee5e97438 diff --git a/http_response_object.c b/http_response_object.c index 1f2b580..28d662a 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -179,6 +179,8 @@ static inline void _http_response_object_declare_default_properties(TSRMLS_D) DCL_STATIC_PROP_N(PROTECTED, contentDisposition); DCL_STATIC_PROP(PROTECTED, long, bufferSize, HTTP_SENDBUF_SIZE); DCL_STATIC_PROP(PROTECTED, double, throttleDelay, 0.0); + + DCL_STATIC_PROP(PUBLIC, string, dummy, "EMPTY"); } /* ### USERLAND ### */ @@ -583,6 +585,17 @@ PHP_METHOD(HttpResponse, getFile) /* {{{ proto bool HttpResponse::send([bool clean_ob = true]) * * Finally send the entity. + * + * Example: + *
+ * 
+ * 
*/ PHP_METHOD(HttpResponse, send) { @@ -593,6 +606,7 @@ PHP_METHOD(HttpResponse, send) RETURN_FALSE; } if (SG(headers_sent)) { + http_error(E_WARNING, HTTP_E_HEADER, "Cannot send HttpResponse, headers have already been sent"); RETURN_FALSE; }