php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #76208
Patch yaf_response_http.patch revision 2018-04-11 12:05 UTC by fanjiapeng at 126 dot com
revision 2018-04-11 12:00 UTC by fanjiapeng at 126 dot com

Patch yaf_response_http.patch for yaf Bug #76208

Patch version 2018-04-11 12:05 UTC

Return to Bug #76208 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2018-04-11 12:05 UTC | 2018-04-11 12:00 UTC

Developer: fanjiapeng@126.com



  diff --git a/responses/yaf_response_http.c b/responses/yaf_response_http.c
 index d277773..ddcc638 100644
 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)) {
 +	if (UNEXPECTED(!(SG(request_info).request_method))) {
  +	   return 0;
  +	}
  +
   	ctr.line_len    = spprintf(&(ctr.line), 0, "%s %s", "Location:", url);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 02:01:29 2024 UTC