Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

HTTP Proxy in Java

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 24594
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!