[Elphel-support] Elphel / C#

support-list support-list at support.elphel.com
Wed Oct 3 10:52:30 PDT 2012


Shane,

Thank you for the feedback on the camera image server (imgsrv - http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/apps/web/imgsrv/imgsrv.c?view=markup ). It will be very helpful if you can isolate the exact problem that .NET "does not like" in the server response - I tried to make it standard and we never had problems with other client software. 

I do not have .NET, so this is the server response I get with wget:
------------------------------------------
$ wget -S "http://192.168.0.12:8081/bimg"
--2012-10-03 11:00:26--  http://192.168.0.12:8081/bimg
Connecting to 192.168.0.12:8081... connected.
HTTP request sent, awaiting response... 
  HTTP/1.0 200 OK
  Server: Elphel Imgsrv
  Expires: 0
  Pragma: no-cache
  Content-Type: image/jpeg
  Content-Disposition: inline; filename="elphelimg_229674.jpeg"
  Content-Length: 230723
Length: 230723 (225K) [image/jpeg]
Saving to: `bimg'

100%[==================================================================================================================================================================>] 230,723     --.-K/s   in 0.02s   

2012-10-03 11:00:26 (9.25 MB/s) - `bimg' saved [230723/230723]
-----------------------------------------

Andrey


---- On Tue, 02 Oct 2012 19:23:04 -0700  <shane.sanford at concurrent.us> wrote ---- 


Thanks for the responses...
  
 I did manage to fix the problem and thought I would report it here in case any one runs across it in the future.
  
 The error seems to be using any .NET application in my case C#.  Specifically when asking for the response from the camera 
  
 System.Net.WebResponse _WebResponse = _HttpWebRequest.GetResponse();
 the following error is thrown  "The server committed a protocol violation. Section=ResponseStatusLine".
 After doing some research and trying multiple solutions it appears .NET has extremely strict expectations on header responses from the camera (could be a extra or missing space or captilization etc...).  The following solution relaxes .NET header requirement for server responses
  
 If added to the app.config, it would be:
  1: <!-- after the applicationSettings --> 2: <system.net> 3:  <settings> 4:  <httpWebRequest useUnsafeHeaderParsing ="true"/> 5:  </settings> 6: </system.net>
 Now everything works as expected...
  
  
  
 Shane
 _______________________________________________ 
Support-list mailing list 
Support-list at support.elphel.com 
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20121003/f200b96f/attachment-0002.html>


More information about the Support-list mailing list