|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
proxy problems
Hi,
I am trying to write a simple servlet proxy. I have rebuilt the http request, and opened a socket to the server the content is on (always the same server). I then write the request to the server on a datainputstream. I think up to this point it is ok as apache is giving a 200 statur code to the request. My problem is that i dont know what to expect as a response from the server. I tried : String responseLine; while ((responseLine = from_server.readLine()) != null) { System.out.println("Server: " + responseLine); } }catch(Exception e){ System.out.println("exception " +e); } (NOTE server = new Socket(TARGET_HOST, TARGET_PORT); from_server = new DataInputStream(server.getInputStream()); ) It just seems to sit there with no response. I understand this is VERY vague but any suggestions as to an alternative way to do it would be appreciated. I know i could just use URL and URLConnections but i would like to retain the full HTTP request from the client. (more vagueness!) If anyone knows what i am trying to say i would appreciate hearing your comments. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > proxy problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|