Twitter api response unreadable

Biohaz4rd

New Member
We have been using twitter api for a while now but suddenly it stopped working. Tracing it back it seems that the response from the \[code\]MSXML2.ServerXMLHTTP\[/code\] request is unreadable by ASP vbscript.Even a simple GET request to a page turns into invalid charactors. Opening https://api.twitter.com/oauth/request_token in a browser will show a string "Failed to validate oauth signature and token". When I try to get the same thing in ASP it returns unreadable data.\[code\]<% @LANGUAGE="VBSCRIPT" %><%Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")objXMLHTTP.open "GET", "https://api.twitter.com/oauth/request_token", falseobjXMLHTTP.send ""Response.Write "<pre>"Response.Write objXMLHTTP.responseTextResponse.Write "<hr>"Response.Write objXMLHTTP.getAllResponseHeaders()Response.Write "</pre>"%>\[/code\]output is:\[code\]?------Date: Thu, 06 Dec 2012 09:12:17 GMTStatus: 401 UnauthorizedX-MID: caa889032d29f5316a855dcadd748211ed4ee276X-Frame-Options: SAMEORIGINCache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0Content-Type: text/html; charset=utf-8Last-Modified: Thu, 06 Dec 2012 09:12:16 GMTPragma: no-cacheX-Transaction: dd71c8da0813a966Expires: Tue, 31 Mar 1981 05:00:00 GMTX-Runtime: 0.02056Set-Cookie: k=10.36.75.125.1354785136971277; path=/; expires=Thu, 13-Dec-12 09:12:16 GMT; domain=.twitter.comSet-Cookie: guest_id=v1%3A135478513698331395; domain=.twitter.com; path=/; expires=Sat, 06-Dec-2014 21:12:16 GMTSet-Cookie: _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCFihfG87ASIKZmxhc2hJQzonQWN0aW9uQ29u%250AdHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7ADoHaWQiJTMx%250AMzI0YjhkNDc4YmQ4MDExMjlhNTI2NWU5OTAxNDVi--97206a42b05d8cb85fbd88ccd9ccb8aaca39ebef; domain=.twitter.com; path=/; HttpOnlyVary: Accept-EncodingContent-Encoding: gzipContent-Length: 62Server: tfe\[/code\]the ? is infact a string with more charactors but cannot be handled because it contains a CHR(0).Now I figured it might be because of the \[code\]Content-Encoding: gzip\[/code\], but even when sending an \[code\]objXMLHTTP.setRequestHeader "Accept-Encoding", "none"\[/code\] (or any other format) it returns the same.Anybody has any idea what I can do to solve this?
 
Back
Top