Skip to content
Snippets Groups Projects
Commit 197e1872 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

Make sure there is never posted data on GET requests

This is an addition to the previous patch to make sure there can not
accidentally $data be passed on a GET request.

darcs-hash:20080331223807-7ad00-0f03763f15a9d907da6a53ed8b3c3e55b906fbc7.gz
parent 246fab09
No related branches found
No related tags found
No related merge requests found
......@@ -197,6 +197,8 @@ class HTTPClient {
}
$headers['Content-Length'] = strlen($data);
$rmethod = 'POST';
}elseif($method == 'GET'){
$data = ''; //no data allowed on GET requests
}
if($this->user) {
$headers['Authorization'] = 'Basic '.base64_encode($this->user.':'.$this->pass);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment