https

Android sending post data to webservice [duplicate]

喜欢而已 提交于 2020-01-03 05:41:11
问题 This question already has answers here : How to fix 'android.os.NetworkOnMainThreadException'? (56 answers) Closed 6 years ago . Hi I'm trying to send data to a webservice String url = "https://www.myurl.com"; URL urlobj = new URL(url); HttpsURLConnection con = (HttpsURLConnection) urlobj.openConnection(); con.setRequestMethod("POST"); con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); String urlParameters = GenerateUrlParameters(data); con.setDoOutput(true); con

ASP .Net Core with Kestrel implement SSL

帅比萌擦擦* 提交于 2020-01-03 04:57:11
问题 i'm facing problem when implementing ssl to my web. My web work as web services for android and ios. All goes very smooth until i implement the SSL certificates, suddenly the android (most of android except samsung) throw this error : E/ErrorHTTP: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. then i google and landed to here : google says about the error support the google statement work around for the error to accept the not valid ssl it says

using https sparingly in my GAEJ app

馋奶兔 提交于 2020-01-03 04:42:12
问题 I have a GAEJ application that until now hasn't had to deal with sensitive data. For that reason it's been happily running under http:// I am using GWT-RPC for my client server calls. However I now want to start storing customer names and addresses, for which I'd like to start using https. I understand the limitation that it has to use the https://www.xxxxx.appspot.com/ domain. My question is how can I create a sub-section of my site that only deals with client-senstive data, leaving the rest

Response failing over HTTPS in Java

社会主义新天地 提交于 2020-01-03 04:15:09
问题 We run crawlers on websites to keep our info up to date. Some websites like this one allow standard navigation with the browser, but they don't send responses when using standard Java libraries. Here's the code I'm using to access the home (index) page, try { URL my_url = new URL("https://www.capitallightingfixture.com"); URLConnection u = my_url.openConnection(); if ( u instanceof HttpURLConnection ) { HttpURLConnection http_u = (HttpURLConnection)u; System.out.println(http_u.getResponseCode

Unable to proxy Maven repo over https/ssl with Nexus

风格不统一 提交于 2020-01-03 03:40:32
问题 I followed the instructions given on this page to import the server certificate. When I use keytool -list , I can see that the certificate is actually in the keystore. If I try to import the .crt file, keytool warns me that the keystore already contains the certificate. Then I updated wrapper.conf with the two ssl options. I can see them on the command line of the Nexus process after a restart. But when I try to add a proxy repo for the remote server, I always get sun.security.validator

Is that safe to pass JWT in urls to authenticate users?

空扰寡人 提交于 2020-01-03 03:08:27
问题 My current architecture is based on a LDAP + JSON Web Token authentication, and my passing Token via the URL this way : https://myHostApp?jwt={myToken} Is that safe to proceed this way, or I should pass another way the Tokens? Assuming also, that SSL is enabled. 回答1: I disagree with the accepted anwser. It is right to say that the use of HTTPS will prevent data leaks. However there are lot of attacks that are achievable if tokens are set in the query string. For example: Using the browser

POSTing to https form not always working

强颜欢笑 提交于 2020-01-03 01:15:31
问题 On my site I have a simple login form. The page is served via HTTP, but the form's POST URL is HTTPS. The normal method is that the user fills in their username/password, the form is submitted (to the fully qualified HTTPS URL, on the same site), and then the POST processing does a 303 redirect to the users' homepage. But sometimes this doesn't happen. The cycle (and this is 100% repeatable) is this: Visit login form, fill in details and submit On the server the login script gets called,

Error reading webpage source code using Python

半腔热情 提交于 2020-01-02 19:59:08
问题 I'm new to Python and I've been trying to get the source code of a page and tried several methods on both Python 2 and 3 (here's one) import urllib url = "https://www.google.ca/?gfe_rd=cr&ei=u6d_VbzoMaei8wfE1oHgBw&gws_rd=ssl#q=test" f = urllib.urlopen(url) source = f.read() print source but I keep getting the following error: Traceback (most recent call last): File "C:\Python34\openpage.py", line 4, in <module> f = urllib.urlopen(url) File "C:\Python27\lib\urllib.py", line 87, in urlopen

Configuring MODx Revolution to work with both http and https

☆樱花仙子☆ 提交于 2020-01-02 19:13:23
问题 I have a website using MODx Revolution (2.2.10-pl, advanced install), let's call it www.example.com , which I want to be accessible with both http and https. to achieve this, I tweaked the site_url context setting to be [[++url_scheme]]www.example.com/ . Links created using [[~id]] seem to be alright, however, sometimes, the generated links are really weird. My interpretation is that the code to create links programmatically doesn't work with my settings, but I don't know why, or how else I

Using BouncyCastle for a simple HTTPS query

折月煮酒 提交于 2020-01-02 18:56:07
问题 Here's a simplified version of the code I'm using to perform simple HTTPS requests: // Assume the variables host, file and postData have valid String values final URL url = new URL("https", host, file); final HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setDoInput(true); connection.setDoOutput(true); connection.setRequestProperty("Content-length", String.valueOf(postData.length())); final DataOutputStream output = new