I've seen servers complaining about the lack of Date header in the request, does anyone knows if it is mandatory for HTTP/1.1?
On Wed, Jan 28, 2009 at 8:55 PM, Dave Cragg <[email protected]> wrote: > > On 28 Jan 2009, at 19:49, Andre Garzia wrote: > >> check the liburlsetcustomhttpheaders command, it will allow you to >> specify a different set of headers, you can use that to do HEAD calls >> without the need to script low level socket routines. >> >> cheers >> andre > > This is possible but you will have to ignore any errors in "the result". > Also, you should add "Connection: close" as one of the headers. Otherwise > depending on the server, libUrl may timeout while waiting to read data from > the socket. (libUrl will think it's handling a GET) And you probably want to > stop redirects (libUrlFollowHttpRedirects). > > I'm not sure that Brian's idea is much more difficult, but the script below > should work. (But see Trevor's comment about authentication. ) > > Assume the url is "http://www.runrev.com/freebeer.html" > > on mouseUp > > libUrlFollowHttpRedirects false > put "HEAD" && "/freebeer.html" && "HTTP/1.1" into tRequest > put cr & "User-Agent: Revolution" after tRequest > put cr & "Host:" && "www.runrev.com" after tRequest > put cr & "Connection: close" after tRequest > libURLSetCustomHTTPHeaders tRequest > get url "http://www.runrev.com/" > > put libUrlLastRhHeaders() > libUrlFollowHttpRedirects true ##RESET > end mouseUp > > Cheers > Dave > _______________________________________________ > use-revolution mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > -- http://www.andregarzia.com All We Do Is Code. _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
