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:00 UTC Return to Bug #76208 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: fanjiapeng@126.comdiff --git a/responses/yaf_response_http.c b/responses/yaf_response_http.c index d277773..ddcc638 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 Group All rights reserved. |
Last updated: Fri Jan 03 03:01:29 2025 UTC |