|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patch yaf_response_http.patch for yaf Bug #76208Patch version 2018-04-11 12:05 UTC Return to Bug #76208 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: fanjiapeng@126.com
diff --git a/responses/yaf_response_http.c b/responses/yaf_response_http.c
index d277773..fb6dc79 100644
--- a/responses/yaf_response_http.c
+++ b/responses/yaf_response_http.c
@@ -136,6 +136,10 @@ int yaf_response_alter_header(yaf_response_t *response, zend_string *name, char
int yaf_response_set_redirect(yaf_response_t *response, char *url, int len) {
sapi_header_line ctr = {0};
+ if (UNEXPECTED(!(SG(request_info).request_method))) {
+ return 0;
+ }
+
ctr.line_len = spprintf(&(ctr.line), 0, "%s %s", "Location:", url);
ctr.response_code = 0;
if (sapi_header_op(SAPI_HEADER_REPLACE, &ctr) == SUCCESS) {
|
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 15:00:01 2025 UTC |