mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
-HttpClient: ’Content-Length’ is added to httprequest if not provided in the headers and a body exists
-expressions in GDScript can take multiple lines if inside parenthesis (python-like) -Added \ to force linebreaks to GDscript (python-like) -added exclude objects from raycast -fixed crashes
This commit is contained in:
@@ -97,8 +97,16 @@ Error HTTPClient::request( Method p_method, const String& p_url, const Vector<St
|
||||
|
||||
String request=String(_methods[p_method])+" "+p_url+" HTTP/1.1\r\n";
|
||||
request+="Host: "+conn_host+":"+itos(conn_port)+"\r\n";
|
||||
bool add_clen=p_body.length()>0;
|
||||
for(int i=0;i<p_headers.size();i++) {
|
||||
request+=p_headers[i]+"\r\n";
|
||||
if (add_clen && p_headers[i].find("Content-Length:")==0) {
|
||||
add_clen=false;
|
||||
}
|
||||
}
|
||||
if (add_clen) {
|
||||
request+="Content-Length: "+itos(p_body.utf8().length())+"\r\n";
|
||||
//should it add utf8 encoding? not sure
|
||||
}
|
||||
request+="\r\n";
|
||||
request+=p_body;
|
||||
|
||||
@@ -56,7 +56,7 @@ String Variant::get_type_name(Variant::Type p_type) {
|
||||
} break;
|
||||
case REAL: {
|
||||
|
||||
return "real";
|
||||
return "float";
|
||||
|
||||
} break;
|
||||
case STRING: {
|
||||
|
||||
Reference in New Issue
Block a user