Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

: is not an identifier


computers / comp.mobile.android / How to real disabled cache from HttPConnect

SubjectAuthor
o How to real disabled cache from HttPConnectJakub

1
How to real disabled cache from HttPConnect

<uhdh3j$3av8t$1@news.icm.edu.pl>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=46365&group=comp.mobile.android#46365

  copy link   Newsgroups: comp.mobile.android
Path: i2pn2.org!i2pn.org!news.chmurka.net!news.icm.edu.pl!.POSTED.public-gprs399640.centertel.pl!not-for-mail
From: jak...@interia.pl (Jakub)
Newsgroups: comp.mobile.android
Subject: How to real disabled cache from HttPConnect
Date: Thu, 26 Oct 2023 13:05:11 +0200
Organization: ICM, Uniwersytet Warszawski
Message-ID: <uhdh3j$3av8t$1@news.icm.edu.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 26 Oct 2023 11:04:19 -0000 (UTC)
Injection-Info: news.icm.edu.pl; posting-host="public-gprs399640.centertel.pl:37.47.192.89";
logging-data="3505437"; mail-complaints-to="usenet@news.icm.edu.pl"
User-Agent: Mozilla Thunderbird
Content-Language: pl
 by: Jakub - Thu, 26 Oct 2023 11:05 UTC

I have this class to connect php server

import java.net.HttpURLConnection
import java.net.URL
import java.util.regex.Pattern

class jHttpConnect03(
private val destinationUrl: String
) {

private var urlConnectionTls: HttpURLConnection? = null

private fun chekregexp(url: String, regexp: String): Boolean {
val mPattern = Pattern.compile(regexp)
return mPattern.matcher(url).find()
}

fun checkTlsAndConnect(): HttpURLConnection? {
if ( !chekregexp(destinationUrl, "^(http://)") ) {
return null
}

try {
// Tell the URLConnection
val url = URL(destinationUrl)

urlConnectionTls = url.openConnection() as HttpURLConnection
/*
urlConnectionTls!!.setRequestProperty("Cache-Control",
"no-cache")
urlConnectionTls!!.setDefaultUseCaches(false)
urlConnectionTls!!.setUseCaches(false)

*/
/*
// set none cache
con.setRequestProperty("Cache-Control", "no-cache");

con.setDefaultUseCaches(false);
con.setUseCaches(false);
*/
//urlConnectionTls!!.sslSocketFactory = context.socketFactory
} catch ( _ : Exception ) {
return null
}

return if ( urlConnectionTls != null ) {
urlConnectionTls
} else {
null
}
}

}

I want real disabled cache for HttpConnect but this don't work

urlConnectionTls!!.setRequestProperty("Cache-Control", "no-cache")
urlConnectionTls!!.setDefaultUseCaches(false)
urlConnectionTls!!.setUseCaches(false)

How to fix this?


computers / comp.mobile.android / How to real disabled cache from HttPConnect

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor