News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Miscellaneous Forum
 
Proxy

Reply

by Dirk Peters [dirkpeters at zonnet dot nl]
posted on 2007/01/31

Hey all,

I was trying the Proxy project and it was looking great. the first website I ran through it (to www.google.com) worked like a charm.
But when I instructed my browser to visit www.netlogics.nl, the request was sent to the google.com server instead of www.netlogics.nl.

I continued testing, and it seems that all request whithin one httplistener are sent to the server that the first request was sent to.

If anyone could tell me what I am missing then that would be awesome :)

Dirk

by Aaron
posted on 2007/02/01
Reply

I got the same issue. Maybe the author will have an idea?
Aaron.

by Aaron
posted on 2007/02/01
Reply

Guess What... I worked it out.

You just need to disable HTTP 1.1

IE has a setting under the advanced tab, where you can disable HTTP 1.1 for proxies.

Hope it works for you.

Aaron

by Dirk Peters [dirkpeters at zonnet dot nl]
posted on 2007/02/02
Reply

Guess what... I fixed it :)

in HttpClient.cs insert the following 2 lines just before the return statement.

if( this.HttpVersion == "HTTP/1.1" )
retdict.Add("Connection", "close");

by Dirk Peters [dirkpeters at zonnet dot nl]
posted on 2007/02/02
Reply

Guess what... I fixed it :)

in HttpClient.cs insert the following 2 lines just before the return statement.

if( this.HttpVersion == "HTTP/1.1" )
retdict.Add("Connection", "close");

by dirk
posted on 2007/02/02
Reply

Sorry for the double post :)

anyway, the http 1.1 problem had to do with pipelining, and if you tell every request that it will be the last one in the pipe, then the socket will be closed afterwards so that the HttpClient object will be disposed of

by Justin [justinbezanson at gmail dot com]
posted on 2010/05/26
Reply

this does indeed make HTTP/1.1 request work but it also seems to break the ability to upload files.

by Justin [justinbezanson at gmail dot com]
posted on 2010/05/26
Reply

OK I was wrong. I can\'t get files to upload even without that snippet of code.

In the first part of the try/catch in HttpClient.IsValidQuery I put the following code to fix it.

if(HeaderFields[\"Content-Type\"] != null) {
if(HeaderFields[\"Content-Type\"].ToString().IndexOf(\"multipart/form-data;\") > -1) {
return true;
}
}

 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.