SQLExpress - Xb2.NET     ot4xb  
xb2net
If-Modified-Since
Thread Starter: Brian L. Wolfsohn Started: 3/5/2008 8:09 AM UTC
Replies: 5
If-Modified-Since
In reviewing the xb2net docs, i see it now supports the if-modified-since header.

Is anyone using this, and could you provide a short example of it on the client and server side ??

Are there any browser incompatibilities with this function ??

Boris, I remember somewhere back in time where you said you were going to support 304 responses in xb2net.  Is this function that ?? or is it something else ??

tired and brain dead in fort lauderdale..

Brian
Re: If-Modified-Since
"Brian L. Wolfsohn" <noblwnospam@cus.com> wrote in
news:Xns9A581FCDB98B3blwcuscom@62.193.212.32:  

Boris, I remember somewhere back in time where you said you were going
to support 304 responses in xb2net.

Xb2.NET always supported 304 responses. If the xbHTTPResponse:StatusCode is 304, then no content will be transmitted to the client.

Best regards,
Boris Borzic
-- news://news.Xb2.NET
http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools
Re: If-Modified-Since
Boris Borzic <ng-at-sqlexpress-dot-net> wrote in
news:Xns9A58A6E1DCBFSQLExpress@62.193.212.32:  

Xb2.NET always supported 304 responses. If the
xbHTTPResponse:StatusCode is 304, then no content will be transmitted
to the client.  

it's my understanding (which is often wrong), that a 304 response is only a possibility if the "if-modified-since" header is used in the request.

where in the http does this header go ?? how can it be limited to only jpg or .gif requests ?

OR, is this so transparent that nothing needs to be done to implement it ?

Brian
Re: If-Modified-Since
"Brian L. Wolfsohn" <noblwnospam@cus.com> wrote in
news:Xns9A58B213858B8blwcuscom@62.193.212.32:  

> Xb2.NET always supported 304 responses. If the
> xbHTTPResponse:StatusCode is 304, then no content will be transmitted
> to the client.  
it's my understanding (which is often wrong), that a 304 response is
only a possibility if the "if-modified-since" header is used in the
request.  

Yes this is correct (as far I know).  

I should have added earlier that the Xb2.NET webserver does not generate 304 responses automatically, but it does provide the tools for you to reply back with a 304 status code, ie:

oResponse:StatusCode := 304

Of course you would need to check if the resource requested has changed from the modified-since date.

Best regards,
Boris Borzic
-- news://news.Xb2.NET
http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools
Re: If-Modified-Since
Boris Borzic <ng-at-sqlexpress-dot-net> wrote in
news:Xns9A58BF29B339CSQLExpress@62.193.212.32:  

Boris,

I've run into a small problem.. Don't know if it is me (as it usually is)
or if you need to make some changes on your end..  

If i look at the object inspector for an xbhttprequest, he ifmodifiedsince variable seems to always be empty.

testing with:
oServer:HTTPRequest:getHeader('IfModifiedSince') confirms this by returning nil
however,

oServer:HTTPRequest:getHeader('If-Modified-Since') returns the proper header.

i can work around it from my end, (don't really know what i'll run into yet <gg>),  

but i thought you should know..

It seems that many of the request headers with a "-" in them don't return the proper results from the object inspector. (this is roger donnay's object inspector).

all the best..
brian



>> Xb2.NET always supported 304 responses. If the
>> xbHTTPResponse:StatusCode is 304, then no content will be
>> transmitted to the client. > > it's my understanding (which is often wrong), that a 304 response is
> only a possibility if the "if-modified-since" header is used in the
> request.  
Yes this is correct (as far I know).  
I should have added earlier that the Xb2.NET webserver does not
generate 304 responses automatically, but it does provide the tools
for you to reply back with a 304 status code, ie:
oResponse:StatusCode := 304
Of course you would need to check if the resource requested has
changed from the modified-since date.
Best regards,
Boris Borzic
Re: If-Modified-Since
"Brian L. Wolfsohn" <noblwnospam@cus.com> wrote in news:Xns9A5FB1AAC1FDBblwcuscom@62.193.212.32:

If i look at the object inspector for an xbhttprequest, he ifmodifiedsince variable seems to always be empty.
testing with:
oServer:HTTPRequest:getHeader('IfModifiedSince') confirms this by returning nil

IfModifiedSince is an access/assign method. Either one of these will work:

? oServer:HTTPRequest:IfModifiedSince
? oServer:HTTPRequest:getHeader('If-Modified-Since')

Best regards,
Boris Borzic
-- news://news.Xb2.NET
http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools