Lines Matching refs:stream

163 	php_stream *stream;  in http_connect()  local
231 stream = php_stream_xport_create(name, namelen, in http_connect()
241 if (stream && *use_proxy && use_ssl) { in http_connect()
247 …php_stream_context_set_option(PHP_STREAM_CONTEXT(stream), "ssl", "peer_name", &ssl_proxy_peer_name… in http_connect()
265 …if (php_stream_write(stream, ZSTR_VAL(soap_headers.s), ZSTR_LEN(soap_headers.s)) != ZSTR_LEN(soap_… in http_connect()
266 php_stream_close(stream); in http_connect()
267 stream = NULL; in http_connect()
271 if (stream) { in http_connect()
272 zend_string *http_headers = get_http_headers(stream); in http_connect()
276 php_stream_close(stream); in http_connect()
277 stream = NULL; in http_connect()
281 if (stream) { in http_connect()
309 if (php_stream_xport_crypto_setup(stream, crypto_method, NULL) < 0 || in http_connect()
310 php_stream_xport_crypto_enable(stream, 1) < 0) { in http_connect()
311 php_stream_close(stream); in http_connect()
312 stream = NULL; in http_connect()
318 return stream; in http_connect()
348 php_stream *stream; in make_http_soap_request() local
421 php_stream_from_zval_no_verify(stream,tmp); in make_http_soap_request()
426 stream = NULL; in make_http_soap_request()
488 if (stream != NULL) { in make_http_soap_request()
499 php_stream_close(stream); in make_http_soap_request()
503 stream = NULL; in make_http_soap_request()
509 if (stream != NULL && php_stream_eof(stream)) { in make_http_soap_request()
510 php_stream_close(stream); in make_http_soap_request()
514 stream = NULL; in make_http_soap_request()
518 if (!stream) { in make_http_soap_request()
519 stream = http_connect(this_ptr, phpurl, use_ssl, context, &use_proxy); in make_http_soap_request()
520 if (stream) { in make_http_soap_request()
521 php_stream_auto_cleanup(stream); in make_http_soap_request()
522 add_property_resource(this_ptr, "httpsocket", stream->res); in make_http_soap_request()
523 GC_ADDREF(stream->res); in make_http_soap_request()
538 if (stream) { in make_http_soap_request()
879 err = php_stream_write(stream, ZSTR_VAL(soap_headers.s), ZSTR_LEN(soap_headers.s)); in make_http_soap_request()
884 php_stream_close(stream); in make_http_soap_request()
900 php_stream_close(stream); in make_http_soap_request()
908 http_headers = get_http_headers(stream); in make_http_soap_request()
913 php_stream_close(stream); in make_http_soap_request()
1085 http_body = get_http_body(stream, http_close, ZSTR_VAL(http_headers)); in make_http_soap_request()
1090 php_stream_close(stream); in make_http_soap_request()
1107 php_stream_close(stream); in make_http_soap_request()
1110 stream = NULL; in make_http_soap_request()
1422 static zend_string* get_http_body(php_stream *stream, int close, char *headers) in get_http_body() argument
1458 php_stream_gets(stream, headerbuf, sizeof(headerbuf)); in get_http_body()
1477 … ssize_t len_read = php_stream_read(stream, http_buf->val + http_buf_size, buf_size - len_size); in get_http_body()
1488 ch = php_stream_getc(stream); in get_http_body()
1490 ch = php_stream_getc(stream); in get_http_body()
1514 if (!php_stream_gets(stream, headerbuf, sizeof(headerbuf))) { in get_http_body()
1535 …ssize_t len_read = php_stream_read(stream, http_buf->val + http_buf_size, header_length - http_buf… in get_http_body()
1549 len_read = php_stream_read(stream, http_buf->val + http_buf_size, 4096); in get_http_body()
1553 } while(!php_stream_eof(stream)); in get_http_body()
1563 static zend_string *get_http_headers(php_stream *stream) in get_http_headers() argument
1568 while (php_stream_gets(stream, headerbuf, sizeof(headerbuf))) { in get_http_headers()