Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fixed TYPE http://... incomplete data

Vince:
1/ Was _DESK just a convenient label for a quick test, not intended to replace the existing internal variable?
2/ Whenever providing a feature, would you make it a variable function, its parameter being the fully qualified URL of the file?
3/ Does "limited to **files**" mean "you must specify the URL of a single file"?
 
You were right and I was wrong.

... Looks like HTTP_QUERY_LAST_MODIFIED
might also be useful.
 
Vince:
1/ Was _DESK just a convenient label for a quick test, not intended to replace the existing internal variable?
2/ Whenever providing a feature, would you make it a variable function, its parameter being the fully qualified URL of the file?
3/ Does "limited to **files**" mean "you must specify the URL of a single file"?
1. Yes. My _DESK function just happened to be staring me in the face when I started DevStudio.
2. Yes, of course.
3. I don't know a lot about it. If I didn't name a "resource" I couldn't get a size. I tried several things as resource ("/", "", NULL, "/.", "index.htm", "index.html") wondering if I could figure out how much data "http://www.jpsoft.com" would cause. None of them worked.
 
I tried that on the same file (tcmd.exe) and got
Sun, 30 Mar 2014 13:46:49 GMT
That happens to be when MY copy was downloaded. My x64 was even more delayed: 2014-04-04 21:10 UTC. Wonder what your test would show?
3. I don't know a lot about it. If I didn't name a "resource" I couldn't get a size. I tried several things as resource ("/", "", NULL, "/.", "index.htm", "index.html") wondering if I could figure out how much data "http://www.jpsoft.com" would cause. None of them worked.
I tried an additional "resource", welcome.htm and html, just using COPY. It apparently also does not exist. I then tested by dropping www. This worked: I could copy both http://jpload.com/index.htm and also with .html extension. Now another surprise! Each time I copied the file it had a different CRC32. I can easily account for this as a - possibly hidden - viewer counter.

Of course, all this is just curiosity...
 
That happens to be when MY copy was downloaded. My x64 was even more delayed: 2014-04-04 21:10 UTC. Wonder what your test would show?

I tried an additional "resource", welcome.htm and html, just using COPY. It apparently also does not exist. I then tested by dropping www. This worked: I could copy both http://jpload.com/index.htm and also with .html extension. Now another surprise! Each time I copied the file it had a different CRC32. I can easily account for this as a - possibly hidden - viewer counter.

Of course, all this is just curiosity...
It wouldn't make much sense to get the size of something like that anyway. Whatever it's called, "default.asp", "default.php", ..., its own size means just about nothing because it would no doubt cause a lot of other resources to be sent (images, et c.).
 
I uploaded new 4UTILS to lucky. Here's what's new. I attached the source in case anyone (Charles, Rex?) wants to play with it (or comment on it). The error-reporting routine is a (very) stripped down version of one from MS (link in the source). I doubt this could produce errors with "extra" text, so I suspect that part of the routine that gets text for extended errors could be eliminated.
Code:
v:\> help @ifilesize
@IFILESIZE[server/.../resource] = file size

v:\> help @ifiletime
@IFILETIME[server/.../resource] = file time

v:\> echo %@ifiletime[jpsoft.com/downloads/v16/tcmd.exe]
Sun, 30 Mar 2014 13:46:49 GMT

v:\> echo %@ifilesize[jpsoft.com/downloads/v16/tcmd.exe]
21534064

v:\> echo %@ifilesize[jpsoft.com/garbage]
TCC: (WININET) The requested header was not found

v:\> echo %@ifilesize[garbage/garbage]
TCC: (WININET) The server name or address could not be resolved
 

Attachments

  • wininet.zip
    1.1 KB · Views: 195
I think Steve's right. This isn't an issue with TYPE, it's an IPWorks issue which also affects COPY, and possibly other commands as well.

I can no longer reproduce this (with either TYPE or COPY) in build 46. Thank you!
 
HttpQueryInfo(hRequest, HTTP_QUERY_CONTENT_LENGTH, pResult, ...)

Heh. It looks like this also provides a way to implement IF EXIST for HTTP files. Use HTTP_QUERY_STATUS_CODE; any value 400 or higher, like say 404, means that the data you get is not from the URI you requested.
 

Similar threads

Back
Top