Skip to content

Commit 7bd81da

Browse files
committed
- WS
1 parent dcfa7ee commit 7bd81da

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

ext/standard/http_fopen_wrapper.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
213213
char header_line[HTTP_HEADER_BLOCK_SIZE];
214214

215215
/* get response header */
216-
while (php_stream_gets(stream, header_line, HTTP_HEADER_BLOCK_SIZE-1) != NULL) {
216+
while (php_stream_gets(stream, header_line, HTTP_HEADER_BLOCK_SIZE-1) != NULL) {
217217
if (header_line[0] == '\n' ||
218218
header_line[0] == '\r' ||
219219
header_line[0] == '\0') {
@@ -233,7 +233,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
233233
}
234234
}
235235

236-
if (stream == NULL)
236+
if (stream == NULL)
237237
goto out;
238238

239239
/* avoid buffering issues while reading header */
@@ -309,7 +309,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
309309
}
310310

311311
/* query string */
312-
if (resource->query) {
312+
if (resource->query) {
313313
strlcat(scratch, "?", scratch_len);
314314
strlcat(scratch, resource->query, scratch_len);
315315
}
@@ -442,15 +442,15 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
442442
}
443443

444444
/* if the user has configured who they are, send a From: line */
445-
if (((have_header & HTTP_HEADER_FROM) == 0) && cfg_get_string("from", &tmp) == SUCCESS) {
445+
if (((have_header & HTTP_HEADER_FROM) == 0) && cfg_get_string("from", &tmp) == SUCCESS) {
446446
if (snprintf(scratch, scratch_len, "From: %s\r\n", tmp) > 0)
447447
php_stream_write(stream, scratch, strlen(scratch));
448448
}
449449

450450
/* Send Host: header so name-based virtual hosts work */
451451
if ((have_header & HTTP_HEADER_HOST) == 0) {
452452
if ((use_ssl && resource->port != 443 && resource->port != 0) ||
453-
(!use_ssl && resource->port != 80 && resource->port != 0)) {
453+
(!use_ssl && resource->port != 80 && resource->port != 0)) {
454454
if (snprintf(scratch, scratch_len, "Host: %s:%i\r\n", resource->host, resource->port) > 0)
455455
php_stream_write(stream, scratch, strlen(scratch));
456456
} else {
@@ -685,7 +685,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
685685
php_stream_close(stream);
686686
stream = NULL;
687687

688-
if (location[0] != '\0') {
688+
if (location[0] != '\0') {
689689

690690
char new_path[HTTP_HEADER_BLOCK_SIZE];
691691
char loc_path[HTTP_HEADER_BLOCK_SIZE];
@@ -697,7 +697,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
697697
strncasecmp(location, "ftps://", sizeof("ftps://")-1)))
698698
{
699699
if (*location != '/') {
700-
if (*(location+1) != '\0' && resource->path) {
700+
if (*(location+1) != '\0' && resource->path) {
701701
char *s = strrchr(resource->path, '/');
702702
if (!s) {
703703
s = resource->path;
@@ -736,20 +736,20 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
736736
goto out;
737737
}
738738

739-
#define CHECK_FOR_CNTRL_CHARS(val) { \
740-
if (val) { \
741-
unsigned char *s, *e; \
742-
int l; \
743-
l = php_url_decode(val, strlen(val)); \
744-
s = (unsigned char*)val; e = s + l; \
745-
while (s < e) { \
746-
if (iscntrl(*s)) { \
747-
php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Invalid redirect URL! %s", new_path); \
748-
goto out; \
749-
} \
750-
s++; \
751-
} \
752-
} \
739+
#define CHECK_FOR_CNTRL_CHARS(val) { \
740+
if (val) { \
741+
unsigned char *s, *e; \
742+
int l; \
743+
l = php_url_decode(val, strlen(val)); \
744+
s = (unsigned char*)val; e = s + l; \
745+
while (s < e) { \
746+
if (iscntrl(*s)) { \
747+
php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Invalid redirect URL! %s", new_path); \
748+
goto out; \
749+
} \
750+
s++; \
751+
} \
752+
} \
753753
}
754754
/* check for control characters in login, password & path */
755755
if (strncasecmp(new_path, "http://", sizeof("http://") - 1) || strncasecmp(new_path, "https://", sizeof("https://") - 1)) {
@@ -839,7 +839,7 @@ static php_stream_wrapper_ops http_stream_wops = {
839839
NULL /* rmdir */
840840
};
841841

842-
PHPAPI php_stream_wrapper php_stream_http_wrapper = {
842+
PHPAPI php_stream_wrapper php_stream_http_wrapper = {
843843
&http_stream_wops,
844844
NULL,
845845
1 /* is_url */

0 commit comments

Comments
 (0)