From: Tony Toews [MVP] on
"Nobody" <nobody(a)nobody.com> wrote:

>Besides what mayayana suggested, check this sample:
>
>SAMPLE: Vbhttp.exe Demonstrates How to Use HTTP WinInet APIs in Visual Basic
>http://support.microsoft.com/kb/259100/en-us
>
>I just tried it. It doesn't have "HEAD" option in the GUI, so in
>btSend_Click(). I changed "GET" to "HEAD", specified the URL to a ZIP
>file(without http://) and it worked fine, without downloading the whole
>file. Server logs shows that only 273 bytes were transferred as opposed to
>2MB.

Ah, thanks kindly. I was hoping that the download would be
significantly less than 273 bytes but that's the way it goes. And
the file I'm looking at downloading might not be too much larger than
273 bytes. Trouble is there could be thousands of them so I was
hoping to reduce the load on the server.

Tony

--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a free, convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
From: Tony Toews [MVP] on
"mayayana" <mayaXXyana(a)rcXXn.com> wrote:

> The following link is for a userControl that uses
>winsock directly.

I've been thinking about this and I feel I'd be much better off going
directly against the Winsock rather than depending on IE stuff.
Whatever MSs definition of stuff is. <smile>

Thanks for posting that link.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a free, convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
From: Nobody on
"Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote in message
news:rsoef518d290jlm0iuasvlejdnmkk09s48(a)4ax.com...
> "Nobody" <nobody(a)nobody.com> wrote:
>
>>Besides what mayayana suggested, check this sample:
>>
>>SAMPLE: Vbhttp.exe Demonstrates How to Use HTTP WinInet APIs in Visual
>>Basic
>>http://support.microsoft.com/kb/259100/en-us
>>
>>I just tried it. It doesn't have "HEAD" option in the GUI, so in
>>btSend_Click(). I changed "GET" to "HEAD", specified the URL to a ZIP
>>file(without http://) and it worked fine, without downloading the whole
>>file. Server logs shows that only 273 bytes were transferred as opposed to
>>2MB.
>
> Ah, thanks kindly. I was hoping that the download would be
> significantly less than 273 bytes but that's the way it goes. And
> the file I'm looking at downloading might not be too much larger than
> 273 bytes. Trouble is there could be thousands of them so I was
> hoping to reduce the load on the server.

The 273 bytes are the HTTP header length. FTP maybe smaller. Here is an
example header that I just tried, it's 250 bytes long when I pasted it into
a hex editor. Server logs also show that 250 bytes were transferred. I used
HEAD method. Actual file length is 7103 bytes as shown in Content-Length.

HTTP/1.1 200 OK
Content-Length: 7103
Content-Type: text/html
Last-Modified: Mon, 26 Oct 2009 22:56:44 GMT
Accept-Ranges: bytes
ETag: "0de92968f56ca1:470e"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Mon, 09 Nov 2009 01:25:11 GMT


From: Nobody on
"Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote in message
news:uooef593eiok0a809kth8kikqj2q7qb23m(a)4ax.com...
> Ah, now that's interesting. I wonder what happens if IE doesn't exist
> on the system. Aren't the EU versions of Windows setup so that IE is
> optional? Or something like that.

You can count on WinInet API being present, even if IE itself wasn't
present. For the EU, there is N version and proposed E version that was
later cancelled. N stands for Not with Media Player, while E stands for IE.
In the E version, only iexplore.exe would be removed, which doesn't effect
WinInet API.

http://en.wikipedia.org/wiki/Windows_XP_N#Windows_XP_Edition_N

See also:

http://en.wikipedia.org/wiki/Internet_Explorer#Removal

The only thing you can't count on is using WinInet API from a service. See
this article for details:

INFO: WinInet Not Supported for Use in Services
http://support.microsoft.com/kb/238425/en-us


From: mayayana on
An additional note for completeness:

Some servers use gzip compression, which
a browser will normally deal with. But when the
request is made directly one's own software has
to deal with it.
It seems that if one does not send an Accept-Encoding:
line in the request then it will not be zipped,
but it's a good idea to check for a Content-Encoding:
line in the header, anyway. If it's there then hopefully
it's gzipped -- Content-Encoding: gzip
In that case it can be easily unzipped using
the zlib library.

Nobody <nobody(a)nobody.com> wrote in message
news:#FWQ6xNYKHA.4688(a)TK2MSFTNGP06.phx.gbl...
> "Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote in message
> news:rsoef518d290jlm0iuasvlejdnmkk09s48(a)4ax.com...
> > "Nobody" <nobody(a)nobody.com> wrote:
> >
> >>Besides what mayayana suggested, check this sample:
> >>
> >>SAMPLE: Vbhttp.exe Demonstrates How to Use HTTP WinInet APIs in Visual
> >>Basic
> >>http://support.microsoft.com/kb/259100/en-us
> >>
> >>I just tried it. It doesn't have "HEAD" option in the GUI, so in
> >>btSend_Click(). I changed "GET" to "HEAD", specified the URL to a ZIP
> >>file(without http://) and it worked fine, without downloading the whole
> >>file. Server logs shows that only 273 bytes were transferred as opposed
to
> >>2MB.
> >
> > Ah, thanks kindly. I was hoping that the download would be
> > significantly less than 273 bytes but that's the way it goes. And
> > the file I'm looking at downloading might not be too much larger than
> > 273 bytes. Trouble is there could be thousands of them so I was
> > hoping to reduce the load on the server.
>
> The 273 bytes are the HTTP header length. FTP maybe smaller. Here is an
> example header that I just tried, it's 250 bytes long when I pasted it
into
> a hex editor. Server logs also show that 250 bytes were transferred. I
used
> HEAD method. Actual file length is 7103 bytes as shown in Content-Length.
>
> HTTP/1.1 200 OK
> Content-Length: 7103
> Content-Type: text/html
> Last-Modified: Mon, 26 Oct 2009 22:56:44 GMT
> Accept-Ranges: bytes
> ETag: "0de92968f56ca1:470e"
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> Date: Mon, 09 Nov 2009 01:25:11 GMT
>
>


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11
Prev: Printing the Form
Next: Common Controls 5.0 / Windows 7