Mhh.. maybe i found the problem.. very strange. HttpClient, only in android, add one space after his header User-Agent.. currently I don't understand why, and how to resolv this problem.. because headers are in a WebHeaderCollection system.
-----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de laur Envoyé : lundi 27 février 2012 14:25 À : 'Discussions related to Mono for Android' Objet : [mono-android] overlong request line on lighttpd with httpclient Codescale project Hello, Does anybody use library httpclient with lighttpd server? I've a very strange problem HttpClient is an apache library, to keep open sockets of one or more servers (I need for lot of servers in this project :) ). There is a traduction for Csharp http://code.google.com/p/c-sharp-http-client/downloads/list if I use it with pure csharp , GET request on apache or lighttpd are OK. (simple request, http://ipaddress/test.php) If I use it (with a dll for monodroid I do, or just copy originals files in my current project), I've a strange problem only with lighttpd. At each GET request, debug mode in lighttpd said: " (request.c.515) overlong request line -> 400" -> 400 - Bad Request I see it too: http://redmine.lighttpd.net/issues/1098 To use it in monodroid project (or Csharp), I just do: HttpClient httpclient = new HttpClient(); HttpGet httpget = new HttpGet(new Uri("http://ipadress/test.php")); HttpResponse httpResponse = httpclient.Execute(httpget); (and of course, httpclient on lighttpd in pure android java, in my old project, works very well) If someone understand the problem.... or know another projet who do the same thing of httpclient.. Regards _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
