PDA

View Full Version : Last Modified Time, http access with Matlab


physEd
12-03-2008, 08:45 AM
Hi,
First of all, I am a HUGE fan of Gbridge, and have told just about everyone I know about this little gem. I am attempting to use Gbridge in conjunction with a (self-coded) Matlab program to access images remotely. I use the "last modified time" to distinguish these images from each other. What I noticed, is that when I attempt to get the "last modified time" via the Matlab command:

imfinfo('http://<comp>.<user>.gbridge.net/images/1a.tif')

This returns (among other things)
FileModDate: '03-Dec-2008 16:38:47'

i.e. it always gives me the current time, not the last mod time. This is despite the fact that the "Last Modified Time" shown in the SecureShare window is correct. I realize that Matlab is not your bag, but do you know why this is? And is it possible to gain direct access to this "Last Modified Time" column? Any thoughts are much appreciated,
Cheers,
Ed

admin
12-03-2008, 01:16 PM
Thanks for reporting this. We will look into this problem.

Very glad to know that you like Gbridge!

admin
12-05-2008, 12:10 AM
It is very strange. I believe Gbridge sends the http header in good format. Here is one example:

HTTP/1.1 200 OK
Date: Fri, 05 Dec 2008 06:59:18 GMT
Server: Gbridge 1.0
Accept-Ranges: bytes
Allow: GET, POST, HEAD
Connection: Keep-Alive
Last-Modified: Wed, 18 Jun 2008 05:18:39 GMT
ETag: "1B5533A8F8866D3E4F43BD34BE893317"
Content-Length: 11264
Content-Type: application/octet-stream

Note that There is a Date header in the response, which is the time in which the response was generated.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.18

Maybe Matlab mistakenly took it as the last-modified header?

Can you use wireshark and capture a network trace (on the gbridge interface)? Thanks.

physEd
12-15-2008, 08:02 AM
I see the same thing...

Hypertext Transfer Protocol
HTTP/1.1 200 OK\r\n
Request Version: HTTP/1.1
Response Code: 200
Date: Mon, 15 Dec 2008 14:51:18 GMT\r\n
Server: Gbridge 1.0\r\n
Accept-Ranges: bytes\r\n
Allow: GET, POST, HEAD\r\n
Connection: Keep-Alive\r\n
Last-Modified: Wed, 03 Dec 2008 11:29:42 GMT\r\n
ETag: "C446822165FD5BD9EF920559E0461B2D"\r\n
Content-Length: 2899642
Content-Type: image/tiff\r\n
\r\n

What is interesting is that Matlab does not return the Date field, or the Last-Modified field, but rather the current time of my local machine. This is enough to convince me that the problem lies with Matlab and not Gbridge. Thanks for the tip,
Ed