Skip to content

Commit

Permalink
Networking ref #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtursKadikis committed Jan 22, 2024
1 parent 48ebee9 commit b443c8c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,16 @@ private enum RequestResult {
urlEndpoint = customEndpoint;
}

// determine whether or not request has a binary image file, if it has request will be sent as POST request
boolean hasPicturePath = requestData.contains(ModuleUserProfile.PICTURE_PATH_KEY);
boolean usingHttpPost = (requestData.contains("&crash=") || requestData.length() >= 2048 || requestInfoProvider_.isHttpPostForced());

long approximateDateSize = 0L;
String urlStr = serverURL_ + urlEndpoint;
if (usingHttpPost) {
String checksum = UtilsNetworking.sha256Hash(requestData + requestInfoProvider_.getRequestSalt());
requestData += "&checksum256=" + checksum;
approximateDateSize += requestData.length();
approximateDateSize += requestData.length(); // add request data to the estimated data size
L.v("[Connection Processor] The following checksum was added:[" + checksum + "]");
} else {
urlStr += "?" + requestData;
Expand Down

0 comments on commit b443c8c

Please sign in to comment.