Lines Matching refs:stream

156 	php_stream *stream;  in http_connect()  local
224 stream = php_stream_xport_create(name, namelen, in http_connect()
234 if (stream && *use_proxy && use_ssl) { in http_connect()
240 …php_stream_context_set_option(PHP_STREAM_CONTEXT(stream), "ssl", "peer_name", &ssl_proxy_peer_name… in http_connect()
258 …if (php_stream_write(stream, ZSTR_VAL(soap_headers.s), ZSTR_LEN(soap_headers.s)) != ZSTR_LEN(soap_… in http_connect()
259 php_stream_close(stream); in http_connect()
260 stream = NULL; in http_connect()
264 if (stream) { in http_connect()
265 zend_string *http_headers = get_http_headers(stream); in http_connect()
269 php_stream_close(stream); in http_connect()
270 stream = NULL; in http_connect()
274 if (stream) { in http_connect()
302 if (php_stream_xport_crypto_setup(stream, crypto_method, NULL) < 0 || in http_connect()
303 php_stream_xport_crypto_enable(stream, 1) < 0) { in http_connect()
304 php_stream_close(stream); in http_connect()
305 stream = NULL; in http_connect()
311 return stream; in http_connect()
341 php_stream *stream; in make_http_soap_request() local
416 php_stream_from_zval_no_verify(stream,tmp); in make_http_soap_request()
422 stream = NULL; in make_http_soap_request()
484 if (stream != NULL) { in make_http_soap_request()
496 php_stream_close(stream); in make_http_soap_request()
500 stream = NULL; in make_http_soap_request()
506 if (stream != NULL && php_stream_eof(stream)) { in make_http_soap_request()
507 php_stream_close(stream); in make_http_soap_request()
511 stream = NULL; in make_http_soap_request()
515 if (!stream) { in make_http_soap_request()
516 stream = http_connect(this_ptr, phpurl, use_ssl, context, &use_proxy); in make_http_soap_request()
517 if (stream) { in make_http_soap_request()
518 php_stream_auto_cleanup(stream); in make_http_soap_request()
519 ZVAL_RES(Z_CLIENT_HTTPSOCKET_P(this_ptr), stream->res); in make_http_soap_request()
520 GC_ADDREF(stream->res); in make_http_soap_request()
537 if (stream) { in make_http_soap_request()
675 php_stream_close(stream); in make_http_soap_request()
883 err = php_stream_write(stream, ZSTR_VAL(soap_headers.s), ZSTR_LEN(soap_headers.s)); in make_http_soap_request()
888 php_stream_close(stream); in make_http_soap_request()
906 http_headers = get_http_headers(stream); in make_http_soap_request()
911 php_stream_close(stream); in make_http_soap_request()
963 php_stream_close(stream); in make_http_soap_request()
1093 http_body = get_http_body(stream, http_close, ZSTR_VAL(http_headers)); in make_http_soap_request()
1098 php_stream_close(stream); in make_http_soap_request()
1115 php_stream_close(stream); in make_http_soap_request()
1118 stream = NULL; in make_http_soap_request()
1425 static zend_string* get_http_body(php_stream *stream, int close, char *headers) in get_http_body() argument
1461 php_stream_gets(stream, headerbuf, sizeof(headerbuf)); in get_http_body()
1480 … ssize_t len_read = php_stream_read(stream, http_buf->val + http_buf_size, buf_size - len_size); in get_http_body()
1491 ch = php_stream_getc(stream); in get_http_body()
1493 ch = php_stream_getc(stream); in get_http_body()
1517 if (!php_stream_gets(stream, headerbuf, sizeof(headerbuf))) { in get_http_body()
1538 …ssize_t len_read = php_stream_read(stream, http_buf->val + http_buf_size, header_length - http_buf… in get_http_body()
1552 len_read = php_stream_read(stream, http_buf->val + http_buf_size, 4096); in get_http_body()
1556 } while(!php_stream_eof(stream)); in get_http_body()
1566 static zend_string *get_http_headers(php_stream *stream) in get_http_headers() argument
1571 while (php_stream_gets(stream, headerbuf, sizeof(headerbuf))) { in get_http_headers()