New topic: HTTPSocket 2012R1 Issue?
<http://forums.realsoftware.com/viewtopic.php?t=45310> Page 1 of 1 [ 5 posts ] Previous topic | Next topic Author Message boborama Post subject: HTTPSocket 2012R1 Issue?Posted: Mon Sep 10, 2012 12:12 pm Joined: Fri Feb 15, 2008 2:19 am Posts: 44 I have a URL for a CGI-script that hands me back an ASCII text stream. I can paste the URL into any browser...and it comes back just fine. (Practically instantaneously) Under Real Studio WE I create a new HTTPSocket called MyHTTPSocket and a string variable MyURL and a string variable MyResult MyResult = MyHTTPSocket(MyURL,30) MsgBox(MyResult) The program with no changes performs perfectly under 2011 R4.3 but doesn't seem to do anything under 2012 R1 I think it just times out. I must be doing something "wrong" but R2011 R4.3 is happy with it. I can re-open the project under 2011 and it runs fine. Top J.Sh3ppard Post subject: Re: HTTPSocket 2012R1 Issue?Posted: Mon Sep 10, 2012 1:04 pm Joined: Tue Mar 23, 2010 8:44 pm Posts: 427 Hi Bob, not sure what your issue is but have a read of this recent 2012_R1 socket thread (it seems you are not the only one having issues) : viewtopic.php?f=7&t=45282 I just did a test using WE / httpsocket and it worked for me. I dropped a button on the page and wrote the code in the button. dim mysocket as new httpsocket dim url as string ="http://www.google.com" dim result as string result = mysocket.get (url,5) msgbox result I got the page's code no problems and it displayed in the msgbox. This is with Mac OS X. Last edited by J.Sh3ppard on Mon Sep 10, 2012 2:00 pm, edited 1 time in total. Top swort Post subject: Re: HTTPSocket 2012R1 Issue?Posted: Mon Sep 10, 2012 1:44 pm Joined: Mon May 31, 2010 5:35 am Posts: 2167 Location: Netherlands boborama wrote:I have a URL for a CGI-script that hands me back an ASCII text stream. I can paste the URL into any browser...and it comes back just fine. (Practically instantaneously) Under Real Studio WE I create a new HTTPSocket called MyHTTPSocket and a string variable MyURL and a string variable MyResult MyResult = MyHTTPSocket(MyURL,30) MsgBox(MyResult) The program with no changes performs perfectly under 2011 R4.3 but doesn't seem to do anything under 2012 R1 I think it just times out. I must be doing something "wrong" but R2011 R4.3 is happy with it. I can re-open the project under 2011 and it runs fine. are you using this code inside a WebPage, WebSession or WebApplication? ( the App class, the Session class or a WebPage?) This should only work in a WebPage or the Session class. _________________ SWORT⢠- Windows Vista, Windows XP, Windows 7, Linux Mint 11 and Mac OSX Lion - REAL Studio Enterprise(latest) and WEB Edition(latest) - Plugins (MBS Complete, ToringoLib, Einhugur, VanHoek + Some open source plugins) For Dutch User Groups ask me to enter! Top boborama Post subject: Re: HTTPSocket 2012R1 Issue?Posted: Mon Sep 10, 2012 2:29 pm Joined: Fri Feb 15, 2008 2:19 am Posts: 44 I'm using this call on a WebPage (ultimately I'd like it to run during the OPEN event since I'm fetching data I want to put on the WebPage....but I figured for Testing I'd just attach it to a button on a web page and display the result in a MsgBox to rule out some potential issues. This may be outside of REAL softwares control...as it may be a malformed HTML response coming from the server. Oddly enough 2011 R4.3 handles it just fine. 2012...not so much. Perhaps the requirements for an HTTP response is now more stringent under 2012. I did try pulling up a system home page...(similar to google.com) and that seems to work. Top J.Sh3ppard Post subject: Re: HTTPSocket 2012R1 Issue?Posted: Mon Sep 10, 2012 2:38 pm Joined: Tue Mar 23, 2010 8:44 pm Posts: 427 boborama wrote:This may be outside of REAL softwares control...as it may be a malformed HTML response coming from the server. Try a TCPsocket and see if you get your data. boborama wrote:Oddly enough 2011 R4.3 handles it just fine. 2012...not so much. It sounds like an RS bug to me. As the other post shows, you're not the only one having these issues. If you're control of the outtputting URL, try converting the data to hex then have it output that. Could be something is messing up the httpsocket in RS like a funky character. If all that fails, try using CURL to grab your data from the non-working URL. Let us know if curl can correctly grab that data. I bet it will. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 5 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml rbforumnotifier@monkeybreadsoftware.de