Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: Accept-Encoding Header is not being passed
User906

Posts: 2
Member Since: 01/10/01
posted January 10, 2001 3:14 AM

Private Function MakeHTTPCall(ByVal p_strURL As String, ByVal p_strReferer As String) As Boolean
     Dim objHeader As New DartSockCtl.DartStrings
     Dim strResponse As String
     '*****************************************
200   On Error GoTo MakeHTTPCall_Err
     '*****************************************
201   Screen.MousePointer = vbHourglass
202   MakeHTTPCall = True
  
   '  objHeader.Add "Accept: image/gif, image/x-xbitmap, image/jpeg" & vbCrLf
203 objHeader.Add "Accept-Encoding: gzip, deflate" & vbCrLf
204 objHeader.Add "Accept-Language: en-us" & vbCrLf
205 objHeader.Add "Referer: " & p_strReferer & vbCrLf
  
206   With objHTTP
207     .version = "HTTP/1.1"
208     .Timeout = g_lngTimeout
209     .url = p_strURL
210     .Proxy = m_strProxy
211     .UserAgent = m_strUserAgent
  
212     On Error Resume Next
213     .GetEx objHeader, strResponse
214     If Err.Number <> 0 Then
215       MakeHTTPCall = False
216       ShowStatus "An HTTP error occured (" & Err.Number & ") - " & Err.Description
217       Err.Clear
218     ElseIf .Status <> 200 Then
219       MakeHTTPCall = False
220       ShowStatus "HTTP status was NOT OK (Status = " & .Status & ") - " & .statusText
221     End If
222   End With
223   txtResponse.Text = strResponse
224   DoEvents
     '*****************************************
MakeHTTPCall_Exit:
225   On Error Resume Next
226   Screen.MousePointer = vbDefault
     'Insert clean-up code...
227   Set objHeader = Nothing
228   Exit Function
MakeHTTPCall_Err:
229   MakeHTTPCall = False
230   HandleError Erl(), "frmMain", "MakeHTTPCall"
231   Resume MakeHTTPCall_Exit
   End Function



in this code I have two problems. First of all the HTTP Version is always 1.0 where as I am setting it to 1.1 and secondly the Accept-Encoding Headers never gets passed. Can you please help me out with this
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted January 10, 2001 9:46 AM


Our controls uses WININET.DLL, which gets the version from the registry. If you have IE setup to to use HTTP 1.0 and you have already started IE, the version will always be 1.0. The version is very hard to control.

I'm not sure the header is not showing up. What means are you using to determine whether it is? Are the other custom lines showing up?

If you still have problem, reduce this down to a simpler function and send the complete project to support@dart.com. If you have support, we'll take a look.

Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX