--- embedaddon/php/ext/standard/http_fopen_wrapper.c 2012/02/21 23:48:02 1.1.1.1 +++ embedaddon/php/ext/standard/http_fopen_wrapper.c 2012/05/29 12:34:43 1.1.1.2 @@ -19,7 +19,7 @@ | Sara Golemon | +----------------------------------------------------------------------+ */ -/* $Id: http_fopen_wrapper.c,v 1.1.1.1 2012/02/21 23:48:02 misho Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.1.1.2 2012/05/29 12:34:43 misho Exp $ */ #include "php.h" #include "php_globals.h" @@ -132,7 +132,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wra Z_TYPE_PP(tmpzval) != IS_STRING || Z_STRLEN_PP(tmpzval) <= 0) { php_url_free(resource); - return php_stream_open_wrapper_ex(path, mode, ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context); + return php_stream_open_wrapper_ex(path, mode, REPORT_ERRORS, NULL, context); } /* Called from a non-http wrapper with http proxying requested (i.e. ftp) */ request_fulluri = 1; @@ -543,12 +543,9 @@ finish: } /* if the user has configured who they are, send a From: line */ - { - char *from_address = php_ini_string("from", sizeof("from"), 0); - if (((have_header & HTTP_HEADER_FROM) == 0) && from_address && from_address[0] != '\0') { - if (snprintf(scratch, scratch_len, "From: %s\r\n", from_address) > 0) - php_stream_write(stream, scratch, strlen(scratch)); - } + if (((have_header & HTTP_HEADER_FROM) == 0) && FG(from_address)) { + if (snprintf(scratch, scratch_len, "From: %s\r\n", FG(from_address)) > 0) + php_stream_write(stream, scratch, strlen(scratch)); } /* Send Host: header so name-based virtual hosts work */