| Dart Home | PowerTCP Web for ActiveX | Custom Development | Reply | PowerTCP Web for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Web for ActiveX Topic: Content-type header not returned to win98 client |
| User366 Posts: 2 Member Since: 07/24/01 |
posted December 19, 2001 10:54 AM We are using the DartWeb control to return different kinds of data from a web server to a custom client. Since we are returning either XML or a zip file to the client, we are using the value of the content-type header to notify the client (either text/xml or application/x-zip). We are using the Dart Web component on the client as part of an ActiveX dll COM component (so we are dynamically instatiating the Web control). When the control is used on a Windows2000 machine, the headers return properly, but on a windows 98 machine the header is always set to "private". Code sample follows: Private WithEvents moHTTP as DartWeb.Http Private moHTTPHeader as DartSock.DartStrings Private mstrRequest as String Private mvarResponse() as Byte ... Public Sub Send() ... moHTTP.Post "XML="& mstrRequest, ,mvarResponse, moHTTPHeader ... End Sub Public Property Get ContentType() as String ContentType=Mid$(moHTTPHeader.Item(4),Len("Content-Type: ")+1) End Property When the Response is fully recieved, the client that calls this object can read the response and the header variables via a property. What could be the cause of this problem? We are using DartWeb version 1.1.0.1 and DartSock 2.2.0.6 |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted December 19, 2001 3:05 PM Hi, I was unable to confirm this. Regardless of the type of file I requested, the Content-Type header was correct (even on Win98). Why are you sure the Content-Type header is going to be the fourth header in the response? You may have more luck using the Find method. For example: s = moHTTPHeader.Find("Content-Type") ContentType = Right(s, Len(s) - Len("Content-Type: ")) -ken K M Drake Dart Tech Support |
| Reply | PowerTCP Web for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|