diff options
author | Wez Furlong <wez@php.net> | 2003-03-05 14:23:56 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2003-03-05 14:23:56 +0000 |
commit | b68739f7f9c9838bed94dae6ef614059c1302ecf (patch) | |
tree | 39ea6a4fe3dda0bfcbaaa76d9f8b1ac28f5037c1 /ext/soap/php_xml.c | |
parent | 6ad2420d2d5797545e288a937f5eb35f4f46a5cf (diff) | |
download | php-git-b68739f7f9c9838bed94dae6ef614059c1302ecf.tar.gz |
- Remove legacy non-streams code (as discussed with Brad).
- Make get_http_header_value() work using case-insensitive compares
for the header names, as per relevant RFC's.
- General performance boost for get_http_headers().
- Fix a crash bug when a malformed URL is passed to the soap client.
- Implement https:// support in the the soap client. (does not verify
the remote server certificate; it provides an encrypted link only).
- Provide a hook for libxml to parse files using any registered PHP
wrapper, including https://, ftps:// and any user-space streams.
Diffstat (limited to 'ext/soap/php_xml.c')
-rw-r--r-- | ext/soap/php_xml.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index 7995356198..786ebc97a5 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -1,5 +1,33 @@ #include "php_soap.h" +/* Channel libxml file io layer through the PHP streams subsystem. + * This allows use of ftps:// and https:// urls */ + +int php_stream_xmlIO_match_wrapper(const char *filename) +{ + TSRMLS_FETCH(); + return php_stream_locate_url_wrapper(filename, NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC) ? 1 : 0; + +} + +void *php_stream_xmlIO_open_wrapper(const char *filename) +{ + TSRMLS_FETCH(); + return php_stream_open_wrapper(filename, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL); +} + +int php_stream_xmlIO_read(void *context, char *buffer, int len) +{ + TSRMLS_FETCH(); + return php_stream_read((php_stream*)context, buffer, len); +} + +int php_stream_xmlIO_close(void *context) +{ + TSRMLS_FETCH(); + return php_stream_close((php_stream*)context); +} + xmlNsPtr attr_find_ns(xmlAttrPtr node) { if(node->ns) |