|
-
August 31st, 2010, 02:47 PM
#1
Home made Proxy little bug.
Hi,
I make a web proxy in c++. It works great by it always stay some little bug. For exemple: When I load the msn home page, there sometime some picture seems broken (X). I can connect to https site but, in Facebook, i cant update my statue. All the other thing work but not this one. The little chat on the left in gmail dont work. Little think like that! Youtube work great! SOme ajax web site work great but, not all! 
Pseudo code:
Each time the port receive a connection
Create a new thread
This is the execution of the new thread:
Receive http request from Browser
Parse the header and connect to server
Send the http request to server
Loop while a connection is close
Manage who wants to talk (Server or Browser)
Transfert the data from who wants to talk to the other
Note:
Before (Send the http request to server), I modify the header becose the header I receive is:
GET http://www.google.com/ HTTP/1.1
Host: www.google.com
...
Modify to:
GET / HTTP/1.1
Host: www.google.com
...
Cache-Control: no
Connection: close
and if the header use the CONNECT methode, I create the connection to the server from the specified port and adresse: CONNECT www.app.com:443 HTTP/1.1 and I return a "HTTP/1.0 200 Connection established\r\n\r\n" to the browser.
The next step, I think, is to open each header send by the browser to see if the information is corect like i do for the first one. If someone have an other idea. plz. talk!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|