Skip to main content

Posts

Showing posts with the label https

creating a Java Proxy Server that accepts HTTPS

i already have a working HTTP proxy server that can handle multiple HTTP request. now my problem is how do I handle https request? here's a simplified code i am using: class Daemon { public static void main(String[] args) { ServerSocket cDaemonSocket = new ServerSocket(3128); while(true) { try { Socket ClientSocket = cDaemonSocket.accept(); (new ClientHandler(ClientSocket )).start(); }catch(Exception e) { } } } } and the ClientHandler class ClientHandler extends Thread { private Socket socket = null; private Socket remoteSocket = null; private HTTPReqHeader request = null; ClientHandler(Socket socket) { this.socket = socket; request = new HTTPReqHeader(); request.parse(socket); // I read and parse the HTTP request here } public void run() { if(!request.isSecure() )

HTTPS failed to load icons from JQuery API

I put CSS of jQuery UI 1.8.4 downto my site source code, with its images folder along. In the default page (wrapping page), jQuery CSS is initialized by declaration: <link href="//Css/App.SrsWPSite/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css" /> My jQuery accordion is set up as usual: $('SomeId').accordion({ header: '.menuItem', icons: { 'header': 'ui-icon-circle-plus', 'headerSelected': 'ui-icon-circle-minus' } }); It works normally in HTTP mode (CSS loaded successfully). But, in HTTPS mode, all jQuery accordion icons (and some other css formats) were unable to be loaded. Taking examination, I found out that they had image url the same to HTTP mode's: url("http://mypath//Css/Site/images/ui-icons_0078ae_256x240.png") If I let my site run binded under both HTTP (with default port 80) and HTTPS, then it's OK ! But for sure, I just want to force my site to ru