Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

路径为什么改变了 #129

Open
lovexiaowei opened this issue Jun 15, 2021 · 1 comment · May be fixed by swlib/http#5
Open

路径为什么改变了 #129

lovexiaowei opened this issue Jun 15, 2021 · 1 comment · May be fixed by swlib/http#5
Labels
enhancement New feature or request

Comments

@lovexiaowei
Copy link

lovexiaowei commented Jun 15, 2021

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

@sy-records
Copy link
Member

这里处理的时候转换了

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 sy-records added the enhancement New feature or request label Jun 15, 2021
sy-records added a commit to swlib/http that referenced this issue Jun 16, 2021
@sy-records sy-records linked a pull request Jun 16, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants