@@ -253,12 +253,12 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, ph
253
253
}
254
254
255
255
smart_str_append_const (& soap_headers , "CONNECT " );
256
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> host ) );
256
+ smart_str_append (& soap_headers , phpurl -> host );
257
257
smart_str_appendc (& soap_headers , ':' );
258
258
smart_str_append_unsigned (& soap_headers , phpurl -> port );
259
259
smart_str_append_const (& soap_headers , " HTTP/1.1\r\n" );
260
260
smart_str_append_const (& soap_headers , "Host: " );
261
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> host ) );
261
+ smart_str_append (& soap_headers , phpurl -> host );
262
262
if (phpurl -> port != 80 ) {
263
263
smart_str_appendc (& soap_headers , ':' );
264
264
smart_str_append_unsigned (& soap_headers , phpurl -> port );
@@ -584,32 +584,32 @@ int make_http_soap_request(zval *this_ptr,
584
584
585
585
smart_str_append_const (& soap_headers , "POST " );
586
586
if (use_proxy && !use_ssl ) {
587
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> scheme ) );
587
+ smart_str_append (& soap_headers , phpurl -> scheme );
588
588
smart_str_append_const (& soap_headers , "://" );
589
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> host ) );
589
+ smart_str_append (& soap_headers , phpurl -> host );
590
590
smart_str_appendc (& soap_headers , ':' );
591
591
smart_str_append_unsigned (& soap_headers , phpurl -> port );
592
592
}
593
593
if (phpurl -> path ) {
594
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> path ) );
594
+ smart_str_append (& soap_headers , phpurl -> path );
595
595
} else {
596
596
smart_str_appendc (& soap_headers , '/' );
597
597
}
598
598
if (phpurl -> query ) {
599
599
smart_str_appendc (& soap_headers , '?' );
600
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> query ) );
600
+ smart_str_append (& soap_headers , phpurl -> query );
601
601
}
602
602
if (phpurl -> fragment ) {
603
603
smart_str_appendc (& soap_headers , '#' );
604
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> fragment ) );
604
+ smart_str_append (& soap_headers , phpurl -> fragment );
605
605
}
606
606
if (http_1_1 ) {
607
607
smart_str_append_const (& soap_headers , " HTTP/1.1\r\n" );
608
608
} else {
609
609
smart_str_append_const (& soap_headers , " HTTP/1.0\r\n" );
610
610
}
611
611
smart_str_append_const (& soap_headers , "Host: " );
612
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> host ) );
612
+ smart_str_append (& soap_headers , phpurl -> host );
613
613
if (phpurl -> port != (use_ssl ?443 :80 )) {
614
614
smart_str_appendc (& soap_headers , ':' );
615
615
smart_str_append_unsigned (& soap_headers , phpurl -> port );
@@ -625,15 +625,15 @@ int make_http_soap_request(zval *this_ptr,
625
625
if (Z_TYPE_P (tmp ) == IS_STRING ) {
626
626
if (Z_STRLEN_P (tmp ) > 0 ) {
627
627
smart_str_append_const (& soap_headers , "User-Agent: " );
628
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( tmp ), Z_STRLEN_P (tmp ));
628
+ smart_str_append (& soap_headers , Z_STR_P (tmp ));
629
629
smart_str_append_const (& soap_headers , "\r\n" );
630
630
}
631
631
} else if (context &&
632
632
(tmp = php_stream_context_get_option (context , "http" , "user_agent" )) != NULL &&
633
633
Z_TYPE_P (tmp ) == IS_STRING ) {
634
634
if (Z_STRLEN_P (tmp ) > 0 ) {
635
635
smart_str_append_const (& soap_headers , "User-Agent: " );
636
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( tmp ), Z_STRLEN_P (tmp ));
636
+ smart_str_append (& soap_headers , Z_STR_P (tmp ));
637
637
smart_str_append_const (& soap_headers , "\r\n" );
638
638
}
639
639
} else if (FG (user_agent )) {
@@ -653,7 +653,7 @@ int make_http_soap_request(zval *this_ptr,
653
653
Z_STRLEN_P (tmp ) > 0
654
654
) {
655
655
smart_str_append_const (& soap_headers , "Content-Type: " );
656
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( tmp ), Z_STRLEN_P (tmp ));
656
+ smart_str_append (& soap_headers , Z_STR_P (tmp ));
657
657
} else {
658
658
smart_str_append_const (& soap_headers , "Content-Type: application/soap+xml; charset=utf-8" );
659
659
}
@@ -670,7 +670,7 @@ int make_http_soap_request(zval *this_ptr,
670
670
Z_STRLEN_P (tmp ) > 0
671
671
) {
672
672
smart_str_append_const (& soap_headers , "Content-Type: " );
673
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( tmp ), Z_STRLEN_P (tmp ));
673
+ smart_str_append (& soap_headers , Z_STR_P (tmp ));
674
674
smart_str_append_const (& soap_headers , "\r\n" );
675
675
} else {
676
676
smart_str_append_const (& soap_headers , "Content-Type: text/xml; charset=utf-8\r\n" );
@@ -682,7 +682,7 @@ int make_http_soap_request(zval *this_ptr,
682
682
}
683
683
}
684
684
smart_str_append_const (& soap_headers ,"Content-Length: " );
685
- smart_str_append_long (& soap_headers , request -> len );
685
+ smart_str_append_unsigned (& soap_headers , ZSTR_LEN ( request ) );
686
686
smart_str_append_const (& soap_headers , "\r\n" );
687
687
688
688
/* HTTP Authentication */
@@ -790,30 +790,30 @@ int make_http_soap_request(zval *this_ptr,
790
790
make_digest (response , hash );
791
791
792
792
smart_str_append_const (& soap_headers , "Authorization: Digest username=\"" );
793
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( login ), Z_STRLEN_P (login ));
793
+ smart_str_append (& soap_headers , Z_STR_P (login ));
794
794
if ((tmp = zend_hash_str_find (Z_ARRVAL_P (digest ), "realm" , sizeof ("realm" )- 1 )) != NULL &&
795
795
Z_TYPE_P (tmp ) == IS_STRING ) {
796
796
smart_str_append_const (& soap_headers , "\", realm=\"" );
797
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( tmp ), Z_STRLEN_P (tmp ));
797
+ smart_str_append (& soap_headers , Z_STR_P (tmp ));
798
798
}
799
799
if ((tmp = zend_hash_str_find (Z_ARRVAL_P (digest ), "nonce" , sizeof ("nonce" )- 1 )) != NULL &&
800
800
Z_TYPE_P (tmp ) == IS_STRING ) {
801
801
smart_str_append_const (& soap_headers , "\", nonce=\"" );
802
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( tmp ), Z_STRLEN_P (tmp ));
802
+ smart_str_append (& soap_headers , Z_STR_P (tmp ));
803
803
}
804
804
smart_str_append_const (& soap_headers , "\", uri=\"" );
805
805
if (phpurl -> path ) {
806
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> path ) );
806
+ smart_str_append (& soap_headers , phpurl -> path );
807
807
} else {
808
808
smart_str_appendc (& soap_headers , '/' );
809
809
}
810
810
if (phpurl -> query ) {
811
811
smart_str_appendc (& soap_headers , '?' );
812
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> query ) );
812
+ smart_str_append (& soap_headers , phpurl -> query );
813
813
}
814
814
if (phpurl -> fragment ) {
815
815
smart_str_appendc (& soap_headers , '#' );
816
- smart_str_appends (& soap_headers , ZSTR_VAL ( phpurl -> fragment ) );
816
+ smart_str_append (& soap_headers , phpurl -> fragment );
817
817
}
818
818
if ((tmp = zend_hash_str_find (Z_ARRVAL_P (digest ), "qop" , sizeof ("qop" )- 1 )) != NULL &&
819
819
Z_TYPE_P (tmp ) == IS_STRING ) {
@@ -829,12 +829,12 @@ int make_http_soap_request(zval *this_ptr,
829
829
if ((tmp = zend_hash_str_find (Z_ARRVAL_P (digest ), "opaque" , sizeof ("opaque" )- 1 )) != NULL &&
830
830
Z_TYPE_P (tmp ) == IS_STRING ) {
831
831
smart_str_append_const (& soap_headers , "\", opaque=\"" );
832
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( tmp ), Z_STRLEN_P (tmp ));
832
+ smart_str_append (& soap_headers , Z_STR_P (tmp ));
833
833
}
834
834
if ((tmp = zend_hash_str_find (Z_ARRVAL_P (digest ), "algorithm" , sizeof ("algorithm" )- 1 )) != NULL &&
835
835
Z_TYPE_P (tmp ) == IS_STRING ) {
836
836
smart_str_append_const (& soap_headers , "\", algorithm=\"" );
837
- smart_str_appendl (& soap_headers , Z_STRVAL_P ( tmp ), Z_STRLEN_P (tmp ));
837
+ smart_str_append (& soap_headers , Z_STR_P (tmp ));
838
838
}
839
839
smart_str_append_const (& soap_headers , "\"\r\n" );
840
840
} else {
@@ -886,7 +886,7 @@ int make_http_soap_request(zval *this_ptr,
886
886
in_domain (phpurl -> host , Z_STR_P (tmp ))) &&
887
887
(use_ssl || (tmp = zend_hash_index_find (Z_ARRVAL_P (data ), 3 )) == NULL )) {
888
888
if (!first_cookie ) {
889
- smart_str_appends (& soap_headers , "; " );
889
+ smart_str_append_const (& soap_headers , "; " );
890
890
}
891
891
first_cookie = false;
892
892
smart_str_append (& soap_headers , key );
@@ -909,7 +909,7 @@ int make_http_soap_request(zval *this_ptr,
909
909
ZVAL_STRINGL (Z_CLIENT_LAST_REQUEST_HEADERS_P (this_ptr ),
910
910
ZSTR_VAL (soap_headers .s ), ZSTR_LEN (soap_headers .s ));
911
911
}
912
- smart_str_appendl (& soap_headers , request -> val , request -> len );
912
+ smart_str_append (& soap_headers , request );
913
913
smart_str_0 (& soap_headers );
914
914
915
915
err = php_stream_write (stream , ZSTR_VAL (soap_headers .s ), ZSTR_LEN (soap_headers .s ));
0 commit comments