Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

msxml post to one site works and the other fails

Status
Not open for further replies.

alltimefav

Programmer
Dec 12, 2006
3
US
This in VB 6.0 with a command button works OK on the first site but fails on
the 2nd site with encoding error. I don't know how to fix this.
error on 2nd site is "System does not support the specified encoding."

Dim xml As Variant
Dim vresponse As Variant
On Error GoTo 10000
1000
Set xml = CreateObject("Msxml2.XmlHttp.4.0")
2500
xml.Open "GET", " False
3000
' Pull the data from the web page
xml.Send
vresponse = xml.responseText
Debug.Print "ALL OK"
4000
'now try another website
5500
xml.Open "GET", " False
6000
' Pull the data from the web page
xml.Send
vresponse = xml.responseText
Debug.Print "ALL OK"
7000
Exit Sub

10000
Debug.Print Error$, Str$(Err), Str$(Erl)





someone replied to me and I tried this:

There is not much you can do with responseText on that site I am afraid.
You might want to use responseBody or responseStream and try to read out
the bytes you get.


xml.responsebody gives
????????????????4?????????????????????????6?????????????????????=???????????

xml.responsestream says type mismatch

This is odd:

When looking at the server headers from alltimefavorites.org they have no
default character set

Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Accept-Ranges: bytes
Content-Length: 6016
Content-Type: text/html; charset=none
Date: Tue, 12 Dec 2006 19:15:37 GMT
ETag: "6ec04b-1780-2e3ab340"
Last-Modified: Tue, 12 Dec 2006 00:15:33 GMT
Server: Apache

and alltimefavorites.com does have a default charset

Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
Date: Tue, 12 Dec 2006 19:23:00 GMT
Server: Apache

Could that be the issue?
 
I cannot reproduce the problem by a quick script. Maybe they have since then change something?
 
Must be client machine based.
It works on some computers who have not upgraded to IE7 and applied latest security updates.

I need to contact Microsoft on this one.

I'll post the solution when I get it.

 
The issue is fixed now with an "automatic update" from yesterday for some odd reason.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top