Skip to content

Commit c78c58e

Browse files
kingtyztianyzh
andauthored
Fix @20596 Crash on Android when HttpResponse did not return 200 OK (#20597)
Co-authored-by: tianyzh <[email protected]>
1 parent 5bf5619 commit c78c58e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ void LuaMinXmlHttpRequest::_gotHeader(const std::string& header)
213213
mystream << pch;
214214

215215
pch = strtok (NULL, "\n");
216-
mystream << " " << pch;
216+
//Send request to a url on Tomcat9. It just returned http response code '200' only,not '200 OK'
217+
if (nullptr != pch) {
218+
mystream << " " << pch;
219+
}
217220

218221
_statusText = mystream.str();
219222

0 commit comments

Comments
 (0)