Skip to content

Commit 9159c5a

Browse files
committed
ext/soap/php_http.c: Refactor get_http_headers()
1 parent 4cd1e69 commit 9159c5a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/soap/php_http.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
static char *get_http_header_value_nodup(char *headers, char *type, size_t *len);
2323
static char *get_http_header_value(char *headers, char *type);
2424
static zend_string *get_http_body(php_stream *stream, bool close, zend_string *headers);
25-
static zend_string *get_http_headers(php_stream *socketd);
25+
static zend_string *get_http_headers(php_stream *stream);
2626

2727
#define smart_str_append_const(str, const) \
2828
smart_str_appendl(str,const,sizeof(const)-1)
@@ -1603,8 +1603,7 @@ static zend_string *get_http_headers(php_stream *stream)
16031603
if ((headerbuf[0] == '\r' && headerbuf[1] == '\n') ||
16041604
(headerbuf[0] == '\n')) {
16051605
/* empty line marks end of headers */
1606-
smart_str_0(&tmp_response);
1607-
return tmp_response.s;
1606+
return smart_str_extract(&tmp_response);
16081607
}
16091608

16101609
/* add header to collection */

0 commit comments

Comments
 (0)