Author Topic: Problem encountered when receiving multi-part form data  (Read 3165 times)

0 Members and 1 Guest are viewing this topic.

ingmar

  • Guest
Problem encountered when receiving multi-part form data
« on: October 16, 2009, 09:31:16 AM »
I'm developing an ActiveX program to receive data from the AV device on the LAN/WAN. The data format is multi-part form. It works fine on most PCs except those the "avast! Antivirus" was installed.

The packet sent by PC is listed below.

GET /cgi/liveview.cgi?action=set&channel.0.command=play HTTP/1.1
Host: 192.168.0.18:80
User-Agent: TwSoft HTTP/RTSP/SOAP Module/1.0
Cache-Control: no-cache
Connection: Keep-Alive
Accept: */*
sessionid: 14
Authorization: Basic YWRtaW46YWRtaW4=

The packets reported from device are listed below.

HTTP/1.1 200 OK
Server: httpd-twsoftware/1.00 beta 11/2006
Content-type: multipart/x-mixed-replace; boundary=--mystreamboundary
Cache-Control: no-cache

--mystreamboundary
Content-Type: notify/info
Content-Length: 247

notify.audio.format=aac
notify.audio.encode=linear
notify.audio.protocol=hbr
notify.audio.sizelength=13
notify.audio.samplerate=8000
notify.audio.bitsample=16
notify.audio.bitrate=32000
notify.audio.ssrc=89faea6
notify.audio.endmark=true

From the log, my program can just received, by recv() function, 17 bytes, "HTTP/1.1 200 OK\r\n", at first time. Because the data was not full, my program tried to receive again and got a SOCKET_ERROR error with WSAECONNABORTED returned by WSAGetLastError(). After some tests, I found the program can work fine if "Web Shield" was disabled or even just add "multipart/x-mixed-replace" into the list of "MIME types to excluded" in "Exceptions" page of "Resident task settings" dialog launched by clicking "Customize…" button.

Any suggestion will be appreciate. Thanks.

CharleyO

  • Guest
Re: Problem encountered when receiving multi-part form data
« Reply #1 on: October 17, 2009, 05:43:13 PM »
***

Bump ... hopefully, someone on the official avast! team can offer some help with this.


***

hans_berner

  • Guest
Re: Problem encountered when receiving multi-part form data
« Reply #2 on: June 18, 2010, 12:14:00 PM »
I also have an IP-camera on my LAN, and I use an activeX control in IE7 to watch the mpeg4 video stream.

Avast!4 was blocking the video but I excluded the camera's IP from network schield and worked around the problem.
With avast!5 I can't do that. You using avast!5 ?
Think I'll revert to 4.8.