This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes HTTP Proxy in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "HTTP Proxy in Java" Watch "HTTP Proxy in Java" New topic
Author

HTTP Proxy in Java

Rahul Dabas
Greenhorn

Joined: Oct 24, 2012
Posts: 1
Hi,
I am supposed to make a HTTP proxy for Get, Post, Head method.
I din know where to start.
SO i looked up online and found one piece here one there and tried to make something
Here is the code i got online:



T problem is when I am getting response from server. My while loops keep going on forever and finally would get -1 as response size and proxy will die.
I don't want that to happen.
Even the browser wont get the whole page. Just about 1/10th maybe.

It is a wrong method to get response from server.
I am a loooong way from finish and submition date is day after.
Pleasssee help someone...


Thanks a lot in advance.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Hello, Rasul, welcome to the Ranch.

I put your code into the "Code" tags so it's easier to read. Hopefully that will cause somebody to take a look at it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP Proxy in Java
 
Similar Threads
Proxy Server in Java
PC Connected to Internet and Internet Connectivity?
socket communication between mobile browser and proxy server
port number
Dealing with a simple web proxy in java