Re: PHP 4.0 Bug #5040 Updated: Support for persistent HTTP/1.0 connections
| From: | Stefan Livieratos | Date: | Sat, 08 Jul 2000 00:21:12 +0000 |
| Subject: | Re: PHP 4.0 Bug #5040 Updated: Support for persistent HTTP/1.0 connections | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-23847@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: Bug Database <php-dev@lists.php.net>
To: <php-dev@lists.php.net>
Sent: Saturday, July 08, 2000 9:43 PM
Subject: [PHP-DEV] PHP 4.0 Bug #5040 Updated: Support for persistent
HTTP/1.0 connections
> ID: 5040
> User Update by: mnot@pobox.com
> Status: Open
> Bug Type: Feature/Change Request
> Description: Support for persistent HTTP/1.0 connections
>
> OK, I'm working on this in a library which can be appended. However, I
really need access to HTTP headers that have already been set (specifically,
Content-Type) by the PHP page.
>
> Bug 5278 is exactly what I need.
>
> Full Bug description available at: http://bugs.php.net/?id=5040
>
Hi,
this is some pseudocode I have written after looking through the
sources:
---8<---
static void php_header_array(element, arg) {
i = size_of(arg);
add_index_stringl(arg, i, element.data, strlen(element.data), 0);
}
PHP_FUNCTION(ob_get_headers) {
if(SG(sapi_headers).headers_sent) {
RETURN_FALSE;
}
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
zend_llist_apply_with_argument(&SG(sapi_headers), php_header_array,
&return_value));
}
---8<---
As I am no C programmer I can't actually write the function but
perhaps this helps you writing it yourself.
Regards,
Stefan