saber icon indicating copy to clipboard operation
saber copied to clipboard

路径为什么改变了

Open lovexiaowei opened this issue 3 years ago • 1 comments

浏览器地址栏请求 http://127.0.0.1:9501/index?q2-303030003300-q.904+11.1b 服务器打印 当前的请求的 query_string 为,正常的,地址没有变化 image 使用saber请求,会变成 q2-303030003300-q_904_11_1b= image

lovexiaowei avatar Jun 15 '21 06:06 lovexiaowei

这里处理的时候转换了

https://github.com/swlib/http/blob/v1.x/src/Request.php#L38-L52

var_dump($request->server['query_string'], $request->get);
// saber
string(28) "q2-303030003300-q_904_11_1b="
array(1) {
    ["q2-303030003300-q_904_11_1b"]=>
  string(0) ""
}

// 浏览器
string(27) "q2-303030003300-q.904+11.1b"
array(1) {
    ["q2-303030003300-q_904_11_1b"]=>
  string(0) ""
}

sy-records avatar Jun 15 '21 11:06 sy-records