GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2011-Mar-15

Title: NETWEBGET$ bug ?
Post by: MrTAToad on 2011-Mar-15
With this code :

Code (glbasic) Select
DEBUG "["+NETWEBGET$("www.bbc.co.uk","/index.htm",80,512)+"]"
IF NETWEBGET$("www.bbc.co.uk","/index.htm",80,512)=""
DEBUG "NULL"
ELSE
DEBUG "NOT NULL"
ENDIF


NETWEBGET$ returns an empty string (NULL) even though the contents of the (invalid) page can be displayed...  Increase the maximum size to, say, 1024, and all is okay...

Repeatedly running does give different results too, for example :

Quote[;</script>   </div>               


</body></html>
]NOT NULL

[al-nav">Skip to local navigation</a></li>  <li class="blq-hide"><a href="#blq-nav-main">Skip to bbc.co.uk navigation</a></li> <li class="bl if you are able to do so.</strong></p></div> </div> </div>    <script type="text/javascript" src="http://static.bbc.co.uk/frameworks/globalpromos/0.4.2/script/core.js"></script>    <script type="text/javascript">globalPromos.init('http://static.bbc.co.uk/frameworks/globalpromos/0.4.2/');</script>   </div>               


</body></html>
]NOT NULL

[round:#e0e0e0 url(/help/404_img/error_panel.gif) no-repeat center;}
#msg {width:626px;height:278px;background:url(/help/404_img/error_404.gif) 460px no-repeat;margin:0 auto;}
#msg a {color:#60a1fd;text-decoration:none;font-weight:bold;}
#msg h2 {font-size:1.1em;padding-top:15px;padding-b4.2/script/core.js"></script>    <script type="text/javascript">globalPromos.init('http://static.bbc.co.uk/frameworks/globalpromos/0.4.2/');</script>   </div>               


</body></html>
]NULL

Although that could be the BBC server...
Title: Re: NETWEBGET$ bug ?
Post by: Kitty Hello on 2011-Mar-16
I only submitted blocks in full 1024 byte chunks. Silly me. Bugfix in the next update.
Title: Re: NETWEBGET$ bug ?
Post by: MrTAToad on 2011-Mar-16
Silly Kitty :)