@@ -896,57 +896,57 @@ int make_http_soap_request(zval *this_ptr,
896
896
897
897
http_headers = NULL ;
898
898
if (return_value || client_trace ) {
899
- do {
900
- http_headers = get_http_headers (stream );
901
- if (!http_headers ) {
902
- if (request != buf ) {
903
- zend_string_release_ex (request , 0 );
899
+ do {
900
+ http_headers = get_http_headers (stream );
901
+ if (!http_headers ) {
902
+ if (request != buf ) {
903
+ zend_string_release_ex (request , 0 );
904
+ }
905
+ php_stream_close (stream );
906
+ convert_to_null (Z_CLIENT_HTTPSOCKET_P (this_ptr ));
907
+ convert_to_null (Z_CLIENT_USE_PROXY_P (this_ptr ));
908
+ add_soap_fault (this_ptr , "HTTP" , "Error Fetching http headers" , NULL , NULL );
909
+ smart_str_free (& soap_headers_z );
910
+ return FALSE;
904
911
}
905
- php_stream_close (stream );
906
- convert_to_null (Z_CLIENT_HTTPSOCKET_P (this_ptr ));
907
- convert_to_null (Z_CLIENT_USE_PROXY_P (this_ptr ));
908
- add_soap_fault (this_ptr , "HTTP" , "Error Fetching http headers" , NULL , NULL );
909
- smart_str_free (& soap_headers_z );
910
- return FALSE;
911
- }
912
912
913
- if (client_trace ) {
914
- zval_ptr_dtor (Z_CLIENT_LAST_RESPONSE_HEADERS_P (this_ptr ));
915
- ZVAL_STR_COPY (Z_CLIENT_LAST_RESPONSE_HEADERS_P (this_ptr ), http_headers );
916
- }
913
+ if (client_trace ) {
914
+ zval_ptr_dtor (Z_CLIENT_LAST_RESPONSE_HEADERS_P (this_ptr ));
915
+ ZVAL_STR_COPY (Z_CLIENT_LAST_RESPONSE_HEADERS_P (this_ptr ), http_headers );
916
+ }
917
917
918
- /* Check to see what HTTP status was sent */
919
- http_1_1 = 0 ;
920
- http_status = 0 ;
921
- http_version = get_http_header_value (ZSTR_VAL (http_headers ), "HTTP/" );
922
- if (http_version ) {
923
- char * tmp ;
918
+ /* Check to see what HTTP status was sent */
919
+ http_1_1 = 0 ;
920
+ http_status = 0 ;
921
+ http_version = get_http_header_value (ZSTR_VAL (http_headers ), "HTTP/" );
922
+ if (http_version ) {
923
+ char * tmp ;
924
924
925
- if (!strncmp (http_version ,"1.1" , 3 )) {
926
- http_1_1 = 1 ;
927
- }
925
+ if (!strncmp (http_version ,"1.1" , 3 )) {
926
+ http_1_1 = 1 ;
927
+ }
928
928
929
- tmp = strstr (http_version ," " );
930
- if (tmp != NULL ) {
931
- tmp ++ ;
932
- http_status = atoi (tmp );
933
- }
934
- tmp = strstr (tmp ," " );
935
- if (tmp != NULL ) {
936
- tmp ++ ;
937
- if (http_msg ) {
938
- efree (http_msg );
929
+ tmp = strstr (http_version ," " );
930
+ if (tmp != NULL ) {
931
+ tmp ++ ;
932
+ http_status = atoi (tmp );
939
933
}
940
- http_msg = estrdup (tmp );
941
- }
942
- efree (http_version );
934
+ tmp = strstr (tmp ," " );
935
+ if (tmp != NULL ) {
936
+ tmp ++ ;
937
+ if (http_msg ) {
938
+ efree (http_msg );
939
+ }
940
+ http_msg = estrdup (tmp );
941
+ }
942
+ efree (http_version );
943
943
944
- /* Try and get headers again */
945
- if (http_status == 100 ) {
946
- zend_string_release_ex (http_headers , 0 );
944
+ /* Try and get headers again */
945
+ if (http_status == 100 ) {
946
+ zend_string_release_ex (http_headers , 0 );
947
+ }
947
948
}
948
- }
949
- } while (http_status == 100 );
949
+ } while (http_status == 100 );
950
950
}
951
951
952
952
if (!return_value ) {
0 commit comments