Re: [AOLSERVER] More on caching content...

2009-04-25 Thread Mark Aufflick
If you are using a library, instead of a servlet and all the tomcat
pain that goes with it, why not make a standalone daemon that uses the
library to convert text, then use ns_proxy to manage and communicate
with a pool of those java processes, and then you can simply use
memoize or whatever to cache and return the content. You could thus
completely eliminate the tomcat, apache.

On Fri, Apr 24, 2009 at 9:26 AM, Janine Sisk jan...@furfly.net wrote:
 This isn't the original code... this is a new servlet I wrote, which uses an
 open source translator written in Java.   It may not be ideal (I am
 certainly not the world's best Java programmer) but the client (mostly
 Chinese-speaking) is happy with the output.

 The advantage is I control the source, but that is only helpful if I know
 what to change. :)

 janine

 On Apr 23, 2009, at 1:21 PM, Stephen Deasey wrote:

 On Thu, Apr 23, 2009 at 7:40 PM, Janine Sisk jan...@furfly.net wrote:

 Trying again... anyone???  Bueller? :)


 Is this tc2sc conversion software actually any good?

 I remember you were having the same problem 18 months ago, and you
 said that the company that wrote the software has gone out of business
 and you don't have the source code.

 The world expert on c2c conversion says that many such programs do
 only a simple 'level 1' conversion:

  http://www.cjk.org/cjk/c2c/c2cbasis.htm

 If that's the case for the program you're using, throw it away!  You
 could perform an equally poor level 1 tc2sc conversion using Tcl's
 built-in charset api easily. Level 2 wouldn't be much harder.  The
 advantage however would be that you would not have to wrestle with
 defunct java software and performance-sucking proxies.

 Maybe you could figure out how awesome the software is by feeding it
 some of the examples from the above web page and see how it measures
 up?


 --
 AOLserver - http://www.aolserver.com/

 To Remove yourself from this list, simply send an email to
 lists...@listserv.aol.com with the
 body of SIGNOFF AOLSERVER in the email message. You can leave the
 Subject: field of your email blank.

 ---
 Janine Sisk
 President/CEO of furfly, LLC
 503-693-6407


 --
 AOLserver - http://www.aolserver.com/

 To Remove yourself from this list, simply send an email to
 lists...@listserv.aol.com with the
 body of SIGNOFF AOLSERVER in the email message. You can leave the Subject:
 field of your email blank.




-- 
Mark Aufflick
  contact info at http://mark.aufflick.com/about/contact


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
lists...@listserv.aol.com with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] More on caching content...

2009-04-23 Thread Janine Sisk

Trying again... anyone???  Bueller? :)


I'm getting closer... CacheIgnoreCacheControl helped.

There was actually one place in OpenACS that might have been adding  
the cache-control header (in acs-tcl/tcl/request-processor-procs.tcl)  
but I commented that out a long time ago and it didn't make any  
difference.


Now, with the CacheIngoreCacheControl directive, the home page gets  
cached properly.  This is progress!! However, dynamic URLs are still  
not being cached.  For example, both of these URLs work:


translator.com/gate/gb/traditional-site.com/public/index
translator.com/gate/gb?url=traditional-site.com/public/index

The former gets cached, the latter does not.

The reason for this is that mod_cache doesn't cache URLs with query  
variables unless either they contain an Expires directive or you turn  
on CacheIgnoreQueryString.  But the latter is rather destructive as it  
returns the same content for all pages - not what one wants.


I went into the OpenACS request processor and added the expires  
header;  you can see it if you telnet to the page, so I know it  
worked, but it's somehow not making it back to Apache (it's not in the  
cached headers, and dynamic URLs are still not being cached).


Any ideas how a header could get lost between AOLserver and Apache?

Oh, and before anyone suggests this I did try adding an expiration via  
mod_expires in Apache, but that had no effect either.  I didn't really  
expect it to, since that's not the request being cached, but it was  
worth a try.


Thanks for everyone's patience with this mostly-OT topic!

janine

PS Here's the relevant part of my httpd.conf file:

# mod_cache/mod_mem_cache
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
IfModule mod_cache.c
CacheEnable disk /
# seconds (86400 = 1 day)
CacheDefaultExpire 86400
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl On
# seconds (2678400 = 31 days)
CacheMaxExpire 2678400
  IfModule mod_mem_cache.c
# KB
#MCacheSize 524288
MCacheSize 262144
MCacheMaxObjectCount 1000
# bytes
MCacheMinObjectSize 1
# bytes
MCacheMaxObjectSize 524288
  /IfModule
  IfModule mod_disk_cache.c
CacheRoot /var/www/cache
CacheDirLevels 1
CacheDirLength 4
CacheMaxFileSize 524288
CacheMinFileSize 1
  /IfModule
/IfModule

#LoadModule headers_module modules/mod_headers.so
#Header set Cache-Control max-age=999

#LoadModule expires_module modules/mod_expires.so
#ExpiresActive On
#ExpiresDefault M86400

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyRequests Off
Proxy *
  Order deny,allow
  Allow from all
/Proxy

#ProxyPassMatch /(.+) http://staging-big5.hrichina.org/$1
ProxyPassMatch /(.+) http://209.162.194.27:8081/$1


On Apr 13, 2009, at 12:47 PM, David Walker wrote:

To aid your troubleshooting, I would recommend a grep or other full- 
text search of the code running on AOLServer to determine if there  
are any circumstances where it would generate a cache-control header.


Your telnet test may not give you all of the data you desire without  
a full set of headers on the request side.  The Tamper Data add-on  
for Firefox will allow you to observe the interaction (headers and  
all) between your browser and the web server.


The CacheIgnoreCacheControl directive may allow you to force Apache  
to cache regardless of whether there is a cache-control directive.


http://httpd.apache.org/docs/2.0/mod/mod_cache.html

Janine Sisk wrote:


This is only peripherally related to AOLserver, but there are so  
many helpful and knowledgeable people on this list, I'm hoping  
someone will recognize this.


I'm still working on that Apache/Tomcat caching thing I wrote about  
a few days ago.  The client is insisting on Apache and nothing but  
Apache, so I haven't investigated Squid, Varnish or anything else  
so far.


I figured out how to use mod_cache to get Apache to cache the  
content, but it's kind of useless because there's a Cache- 
Control:  max-age=0 header that causes it to request a new copy  
every time.  The problem is, I can't figure out where it's coming  
from.


I've eliminated Tomcat from the loop entirely, so the fault lies  
somewhere between AOLserver and Apache:


- telnet to AOLserver directly - no cache-control at all

GET /public/index HTTP/1.0

HTTP/1.0 200 OK
Set-Cookie: ad_session_id=82810106%2c0%2c0+ 
%7b514+1239579021+56A366FC5E92AF28DB87E48214C6C4CE8C0581BB%7d;  
Path=/; Max-Age=1200

MIME-Version: 1.0
Date: Sun, 12 Apr 2009 23:10:21 GMT
Server: AOLserver/4.0.10
Content-Type: text/html; charset=utf-8
Content-Length: 127358
Connection: close

- have Apache send request to AOLserver via mod_proxy  
(ProxyPassMatch) - has Cache-Control with max-age=0


Last-Modified: Mon, 30 Mar 2009 11:26:14 GMT
MIME-Version: 1.0
Date: Sun, 12 Apr 2009 23:03:02 GMT
Server: AOLserver/4.0.10
Content-Type: image/gif
Content-Length: 395


Re: [AOLSERVER] More on caching content...

2009-04-23 Thread Stephen Deasey
On Thu, Apr 23, 2009 at 7:40 PM, Janine Sisk jan...@furfly.net wrote:
 Trying again... anyone???  Bueller? :)


Is this tc2sc conversion software actually any good?

I remember you were having the same problem 18 months ago, and you
said that the company that wrote the software has gone out of business
and you don't have the source code.

The world expert on c2c conversion says that many such programs do
only a simple 'level 1' conversion:

  http://www.cjk.org/cjk/c2c/c2cbasis.htm

If that's the case for the program you're using, throw it away!  You
could perform an equally poor level 1 tc2sc conversion using Tcl's
built-in charset api easily. Level 2 wouldn't be much harder.  The
advantage however would be that you would not have to wrestle with
defunct java software and performance-sucking proxies.

Maybe you could figure out how awesome the software is by feeding it
some of the examples from the above web page and see how it measures
up?


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
lists...@listserv.aol.com with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] More on caching content...

2009-04-23 Thread David Walker
Check the format of the Expires header.  It must be in RFC 1123 date
format, which, if I understand the documentation, looks like the line below.

Expires: Thu, 01 Dec 1994 16:00:00 GMT

Also, make sure you know how to clear the cache on Apache.
I think rm -rf /var/www/cache/* will work.  Clearing the cache as you
troubleshoot will help you avoid having something cached blocking the
caching of your new request.

Also, try also sending a Last-Modified header or setting
CacheIgnoreNoLastMod On

Janine Sisk wrote:
 Trying again... anyone???  Bueller? :)


 I'm getting closer... CacheIgnoreCacheControl helped.

 There was actually one place in OpenACS that might have been adding
 the cache-control header (in acs-tcl/tcl/request-processor-procs.tcl)
 but I commented that out a long time ago and it didn't make any
 difference.

 Now, with the CacheIngoreCacheControl directive, the home page gets
 cached properly.  This is progress!! However, dynamic URLs are still
 not being cached.  For example, both of these URLs work:

 translator.com/gate/gb/traditional-site.com/public/index
 translator.com/gate/gb?url=traditional-site.com/public/index

 The former gets cached, the latter does not.

 The reason for this is that mod_cache doesn't cache URLs with query
 variables unless either they contain an Expires directive or you turn
 on CacheIgnoreQueryString.  But the latter is rather destructive as it
 returns the same content for all pages - not what one wants.

 I went into the OpenACS request processor and added the expires
 header;  you can see it if you telnet to the page, so I know it
 worked, but it's somehow not making it back to Apache (it's not in the
 cached headers, and dynamic URLs are still not being cached).

 Any ideas how a header could get lost between AOLserver and Apache?

 Oh, and before anyone suggests this I did try adding an expiration via
 mod_expires in Apache, but that had no effect either.  I didn't really
 expect it to, since that's not the request being cached, but it was
 worth a try.

 Thanks for everyone's patience with this mostly-OT topic!

 janine

 PS Here's the relevant part of my httpd.conf file:

 # mod_cache/mod_mem_cache
 LoadModule cache_module modules/mod_cache.so
 LoadModule disk_cache_module modules/mod_disk_cache.so
 IfModule mod_cache.c
 CacheEnable disk /
 # seconds (86400 = 1 day)
 CacheDefaultExpire 86400
 CacheIgnoreNoLastMod On
 CacheIgnoreCacheControl On
 # seconds (2678400 = 31 days)
 CacheMaxExpire 2678400
   IfModule mod_mem_cache.c
 # KB
 #MCacheSize 524288
 MCacheSize 262144
 MCacheMaxObjectCount 1000
 # bytes
 MCacheMinObjectSize 1
 # bytes
 MCacheMaxObjectSize 524288
   /IfModule
   IfModule mod_disk_cache.c
 CacheRoot /var/www/cache
 CacheDirLevels 1
 CacheDirLength 4
 CacheMaxFileSize 524288
 CacheMinFileSize 1
   /IfModule
 /IfModule

 #LoadModule headers_module modules/mod_headers.so
 #Header set Cache-Control max-age=999

 #LoadModule expires_module modules/mod_expires.so
 #ExpiresActive On
 #ExpiresDefault M86400

 LoadModule proxy_module modules/mod_proxy.so
 LoadModule proxy_http_module modules/mod_proxy_http.so
 ProxyRequests Off
 Proxy *
   Order deny,allow
   Allow from all
 /Proxy

 #ProxyPassMatch /(.+) http://staging-big5.hrichina.org/$1
 ProxyPassMatch /(.+) http://209.162.194.27:8081/$1


 On Apr 13, 2009, at 12:47 PM, David Walker wrote:

 To aid your troubleshooting, I would recommend a grep or other
 full-text search of the code running on AOLServer to determine if
 there are any circumstances where it would generate a cache-control
 header.

 Your telnet test may not give you all of the data you desire without
 a full set of headers on the request side.  The Tamper Data add-on
 for Firefox will allow you to observe the interaction (headers and
 all) between your browser and the web server.

 The CacheIgnoreCacheControl directive may allow you to force Apache
 to cache regardless of whether there is a cache-control directive.

 http://httpd.apache.org/docs/2.0/mod/mod_cache.html

 Janine Sisk wrote:
 This is only peripherally related to AOLserver, but there are so
 many helpful and knowledgeable people on this list, I'm hoping
 someone will recognize this.

 I'm still working on that Apache/Tomcat caching thing I wrote about
 a few days ago.  The client is insisting on Apache and nothing but
 Apache, so I haven't investigated Squid, Varnish or anything else so
 far.

 I figured out how to use mod_cache to get Apache to cache the
 content, but it's kind of useless because there's a Cache-Control:
  max-age=0 header that causes it to request a new copy every time.
  The problem is, I can't figure out where it's coming from.

 I've eliminated Tomcat from the loop entirely, so the fault lies
 somewhere between AOLserver and Apache:

 - telnet to AOLserver directly - no cache-control at all

 GET /public/index HTTP/1.0

 HTTP/1.0 200 OK
 Set-Cookie:
 

Re: [AOLSERVER] More on caching content...

2009-04-23 Thread Janine Sisk
This isn't the original code... this is a new servlet I wrote, which  
uses an open source translator written in Java.   It may not be ideal  
(I am certainly not the world's best Java programmer) but the client  
(mostly Chinese-speaking) is happy with the output.


The advantage is I control the source, but that is only helpful if I  
know what to change. :)


janine

On Apr 23, 2009, at 1:21 PM, Stephen Deasey wrote:

On Thu, Apr 23, 2009 at 7:40 PM, Janine Sisk jan...@furfly.net  
wrote:

Trying again... anyone???  Bueller? :)



Is this tc2sc conversion software actually any good?

I remember you were having the same problem 18 months ago, and you
said that the company that wrote the software has gone out of business
and you don't have the source code.

The world expert on c2c conversion says that many such programs do
only a simple 'level 1' conversion:

 http://www.cjk.org/cjk/c2c/c2cbasis.htm

If that's the case for the program you're using, throw it away!  You
could perform an equally poor level 1 tc2sc conversion using Tcl's
built-in charset api easily. Level 2 wouldn't be much harder.  The
advantage however would be that you would not have to wrestle with
defunct java software and performance-sucking proxies.

Maybe you could figure out how awesome the software is by feeding it
some of the examples from the above web page and see how it measures
up?


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to lists...@listserv.aol.com 
 with the
body of SIGNOFF AOLSERVER in the email message. You can leave the  
Subject: field of your email blank.


---
Janine Sisk
President/CEO of furfly, LLC
503-693-6407


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
lists...@listserv.aol.com with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] More on caching content...

2009-04-23 Thread Janine Sisk


On Apr 23, 2009, at 1:41 PM, David Walker wrote:

Check the format of the Expires header.  It must be in RFC 1123 date  
format, which, if I understand the documentation, looks like the  
line below.


Expires: Thu, 01 Dec 1994 16:00:00 GMT


It's being put in by AOLserver's ns_setexpires directive, so hopefully  
it's formatted properly.  I can't check right at this moment but I  
know it looked more or less like that.



Also, make sure you know how to clear the cache on Apache.
I think rm -rf /var/www/cache/* will work.  Clearing the cache as  
you troubleshoot will help you avoid having something cached  
blocking the caching of your new request.


Yes, I have been doing that frequently.

Also, try also sending a Last-Modified header or setting  
CacheIgnoreNoLastMod On


I've already got that directive turned on.

thanks,

janine


Janine Sisk wrote:


Trying again... anyone???  Bueller? :)


I'm getting closer... CacheIgnoreCacheControl helped.

There was actually one place in OpenACS that might have been adding  
the cache-control header (in acs-tcl/tcl/request-processor- 
procs.tcl) but I commented that out a long time ago and it didn't  
make any difference.


Now, with the CacheIngoreCacheControl directive, the home page gets  
cached properly.  This is progress!! However, dynamic URLs are  
still not being cached.  For example, both of these URLs work:


translator.com/gate/gb/traditional-site.com/public/index
translator.com/gate/gb?url=traditional-site.com/public/index

The former gets cached, the latter does not.

The reason for this is that mod_cache doesn't cache URLs with query  
variables unless either they contain an Expires directive or you  
turn on CacheIgnoreQueryString.  But the latter is rather  
destructive as it returns the same content for all pages - not what  
one wants.


I went into the OpenACS request processor and added the expires  
header;  you can see it if you telnet to the page, so I know it  
worked, but it's somehow not making it back to Apache (it's not in  
the cached headers, and dynamic URLs are still not being cached).


Any ideas how a header could get lost between AOLserver and Apache?

Oh, and before anyone suggests this I did try adding an expiration  
via mod_expires in Apache, but that had no effect either.  I didn't  
really expect it to, since that's not the request being cached, but  
it was worth a try.


Thanks for everyone's patience with this mostly-OT topic!

janine

PS Here's the relevant part of my httpd.conf file:

# mod_cache/mod_mem_cache
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
IfModule mod_cache.c
CacheEnable disk /
# seconds (86400 = 1 day)
CacheDefaultExpire 86400
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl On
# seconds (2678400 = 31 days)
CacheMaxExpire 2678400
  IfModule mod_mem_cache.c
# KB
#MCacheSize 524288
MCacheSize 262144
MCacheMaxObjectCount 1000
# bytes
MCacheMinObjectSize 1
# bytes
MCacheMaxObjectSize 524288
  /IfModule
  IfModule mod_disk_cache.c
CacheRoot /var/www/cache
CacheDirLevels 1
CacheDirLength 4
CacheMaxFileSize 524288
CacheMinFileSize 1
  /IfModule
/IfModule

#LoadModule headers_module modules/mod_headers.so
#Header set Cache-Control max-age=999

#LoadModule expires_module modules/mod_expires.so
#ExpiresActive On
#ExpiresDefault M86400

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyRequests Off
Proxy *
  Order deny,allow
  Allow from all
/Proxy

#ProxyPassMatch /(.+) http://staging-big5.hrichina.org/$1
ProxyPassMatch /(.+) http://209.162.194.27:8081/$1


On Apr 13, 2009, at 12:47 PM, David Walker wrote:

To aid your troubleshooting, I would recommend a grep or other  
full-text search of the code running on AOLServer to determine if  
there are any circumstances where it would generate a cache- 
control header.


Your telnet test may not give you all of the data you desire  
without a full set of headers on the request side.  The Tamper  
Data add-on for Firefox will allow you to observe the interaction  
(headers and all) between your browser and the web server.


The CacheIgnoreCacheControl directive may allow you to force  
Apache to cache regardless of whether there is a cache-control  
directive.


http://httpd.apache.org/docs/2.0/mod/mod_cache.html

Janine Sisk wrote:


This is only peripherally related to AOLserver, but there are so  
many helpful and knowledgeable people on this list, I'm hoping  
someone will recognize this.


I'm still working on that Apache/Tomcat caching thing I wrote  
about a few days ago.  The client is insisting on Apache and  
nothing but Apache, so I haven't investigated Squid, Varnish or  
anything else so far.


I figured out how to use mod_cache to get Apache to cache the  
content, but it's kind of useless because there's a Cache- 
Control:  max-age=0 header that causes it to 

Re: [AOLSERVER] More on caching content...

2009-04-18 Thread Janine Sisk

I'm getting closer... CacheIgnoreCacheControl helped.

There was actually one place in OpenACS that might have been adding  
the cache-control header (in acs-tcl/tcl/request-processor-procs.tcl)  
but I commented that out a long time ago and it didn't make any  
difference.


Now, with the CacheIngoreCacheControl directive, the home page gets  
cached properly.  This is progress!! However, dynamic URLs are still  
not being cached.  For example, both of these URLs work:


translator.com/gate/gb/traditional-site.com/public/index
translator.com/gate/gb?url=traditional-site.com/public/index

The former gets cached, the latter does not.

The reason for this is that mod_cache doesn't cache URLs with query  
variables unless either they contain an Expires directive or you turn  
on CacheIgnoreQueryString.  But the latter is rather destructive as it  
returns the same content for all pages - not what one wants.


I went into the OpenACS request processor and added the expires  
header;  you can see it if you telnet to the page, so I know it  
worked, but it's somehow not making it back to Apache (it's not in the  
cached headers, and dynamic URLs are still not being cached).


Any ideas how a header could get lost between AOLserver and Apache?

Oh, and before anyone suggests this I did try adding an expiration via  
mod_expires in Apache, but that had no effect either.  I didn't really  
expect it to, since that's not the request being cached, but it was  
worth a try.


Thanks for everyone's patience with this mostly-OT topic!

janine

PS Here's the relevant part of my httpd.conf file:

# mod_cache/mod_mem_cache
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
IfModule mod_cache.c
CacheEnable disk /
# seconds (86400 = 1 day)
CacheDefaultExpire 86400
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl On
# seconds (2678400 = 31 days)
CacheMaxExpire 2678400
  IfModule mod_mem_cache.c
# KB
#MCacheSize 524288
MCacheSize 262144
MCacheMaxObjectCount 1000
# bytes
MCacheMinObjectSize 1
# bytes
MCacheMaxObjectSize 524288
  /IfModule
  IfModule mod_disk_cache.c
CacheRoot /var/www/cache
CacheDirLevels 1
CacheDirLength 4
CacheMaxFileSize 524288
CacheMinFileSize 1
  /IfModule
/IfModule

#LoadModule headers_module modules/mod_headers.so
#Header set Cache-Control max-age=999

#LoadModule expires_module modules/mod_expires.so
#ExpiresActive On
#ExpiresDefault M86400

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyRequests Off
Proxy *
  Order deny,allow
  Allow from all
/Proxy

#ProxyPassMatch /(.+) http://staging-big5.hrichina.org/$1
ProxyPassMatch /(.+) http://209.162.194.27:8081/$1


On Apr 13, 2009, at 12:47 PM, David Walker wrote:

To aid your troubleshooting, I would recommend a grep or other full- 
text search of the code running on AOLServer to determine if there  
are any circumstances where it would generate a cache-control header.


Your telnet test may not give you all of the data you desire without  
a full set of headers on the request side.  The Tamper Data add-on  
for Firefox will allow you to observe the interaction (headers and  
all) between your browser and the web server.


The CacheIgnoreCacheControl directive may allow you to force Apache  
to cache regardless of whether there is a cache-control directive.


http://httpd.apache.org/docs/2.0/mod/mod_cache.html

Janine Sisk wrote:


This is only peripherally related to AOLserver, but there are so  
many helpful and knowledgeable people on this list, I'm hoping  
someone will recognize this.


I'm still working on that Apache/Tomcat caching thing I wrote about  
a few days ago.  The client is insisting on Apache and nothing but  
Apache, so I haven't investigated Squid, Varnish or anything else  
so far.


I figured out how to use mod_cache to get Apache to cache the  
content, but it's kind of useless because there's a Cache- 
Control:  max-age=0 header that causes it to request a new copy  
every time.  The problem is, I can't figure out where it's coming  
from.


I've eliminated Tomcat from the loop entirely, so the fault lies  
somewhere between AOLserver and Apache:


- telnet to AOLserver directly - no cache-control at all

GET /public/index HTTP/1.0

HTTP/1.0 200 OK
Set-Cookie: ad_session_id=82810106%2c0%2c0+ 
%7b514+1239579021+56A366FC5E92AF28DB87E48214C6C4CE8C0581BB%7d;  
Path=/; Max-Age=1200

MIME-Version: 1.0
Date: Sun, 12 Apr 2009 23:10:21 GMT
Server: AOLserver/4.0.10
Content-Type: text/html; charset=utf-8
Content-Length: 127358
Connection: close

- have Apache send request to AOLserver via mod_proxy  
(ProxyPassMatch) - has Cache-Control with max-age=0


Last-Modified: Mon, 30 Mar 2009 11:26:14 GMT
MIME-Version: 1.0
Date: Sun, 12 Apr 2009 23:03:02 GMT
Server: AOLserver/4.0.10
Content-Type: image/gif
Content-Length: 395

User-Agent: Mozilla/5.0 (Macintosh; U; 

Re: [AOLSERVER] More on caching content...

2009-04-13 Thread Mark Aufflick
Hi Janine,

The key with Apache documentation is to know which module is going to
do what you want. Once you've figured that out, the docs are quite
clear (with the exception of mod_rewrite of course :)

In this case I happen to know that the Cache-control header is
generated by mod_expires, and you will find how to control it here:

http://httpd.apache.org/docs/2.0/mod/mod_expires.html

Your httpd config might have expiration set by default, or by file extension.

Mark.

On Mon, Apr 13, 2009 at 9:32 AM, Janine Sisk jan...@furfly.net wrote:
 This is only peripherally related to AOLserver, but there are so many
 helpful and knowledgeable people on this list, I'm hoping someone will
 recognize this.
 I'm still working on that Apache/Tomcat caching thing I wrote about a few
 days ago.  The client is insisting on Apache and nothing but Apache, so I
 haven't investigated Squid, Varnish or anything else so far.
 I figured out how to use mod_cache to get Apache to cache the content, but
 it's kind of useless because there's a Cache-Control:  max-age=0 header
 that causes it to request a new copy every time.  The problem is, I can't
 figure out where it's coming from.
 I've eliminated Tomcat from the loop entirely, so the fault lies somewhere
 between AOLserver and Apache:
 - telnet to AOLserver directly - no cache-control at all
 GET /public/index HTTP/1.0
 HTTP/1.0 200 OK
 Set-Cookie:
 ad_session_id=82810106%2c0%2c0+%7b514+1239579021+56A366FC5E92AF28DB87E48214C6C4CE8C0581BB%7d;
 Path=/; Max-Age=1200
 MIME-Version: 1.0
 Date: Sun, 12 Apr 2009 23:10:21 GMT
 Server: AOLserver/4.0.10
 Content-Type: text/html; charset=utf-8
 Content-Length: 127358
 Connection: close
 - have Apache send request to AOLserver via mod_proxy (ProxyPassMatch) - has
 Cache-Control with max-age=0
 Last-Modified: Mon, 30 Mar 2009 11:26:14 GMT
 MIME-Version: 1.0
 Date: Sun, 12 Apr 2009 23:03:02 GMT
 Server: AOLserver/4.0.10
 Content-Type: image/gif
 Content-Length: 395
 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
 AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
 Referer: http://pug.furfly.com:8080/public/index
 Cache-Control: max-age=0
 Accept: */*
 Accept-Language: en-us
 Accept-Encoding: gzip, deflate
 - use mod_headers to add a Cache-Control header - now we have two:
 Last-Modified: Mon, 30 Mar 2009 11:26:14 GMT
 MIME-Version: 1.0
 Date: Sun, 12 Apr 2009 23:15:04 GMT
 Server: AOLserver/4.0.10
 Content-Type: image/gif
 Content-Length: 395
 Cache-Control: max-age=999
 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
 AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
 Referer: http://pug.furfly.com:8080/public/index
 Cache-Control: max-age=0
 Accept: */*
 Accept-Language: en-us
 Accept-Encoding: gzip, deflate

 It appears that Apache is adding the rogue header, but I don't know how to
 tell it to stop!
 Any suggestions?
 janine

 ---
 Janine Sisk
 President/CEO of furfly, LLC
 503-693-6407




 --
 AOLserver - http://www.aolserver.com/

 To Remove yourself from this list, simply send an email to
 lists...@listserv.aol.com with the
 body of SIGNOFF AOLSERVER in the email message. You can leave the Subject:
 field of your email blank.




-- 
Mark Aufflick
  contact info at http://mark.aufflick.com/about/contact


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
lists...@listserv.aol.com with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] More on caching content...

2009-04-13 Thread Janine Sisk
Mark, thanks for the tip - it sounded logical but unfortunately  
doesn't seem to be the case.  I didn't have any expire directives in  
the conf file but I added this anyway:


ExpiresActive On
ExpiresDefault M86400

and it doesn't seem to be making any difference.  I tried commenting  
out the code for mod_headers and then the first Cache-Control line is  
missing, but the one with max-age=0 is still there.


just for grins, I tried using telnet to request the URL instead of  
going to it in the browser.  I then found the corresponding header in  
Apache's cache (this one is the actual HTML, the rest are all images),  
so it's more of an apples-to-apples comparison.  Both are below.  The  
interesting thing is that the cached header includes a lot more  
information, including the erroneous Cache-Control: max-age=0.  Some  
of it comes from mod_proxy, specifically the X-Forwarded part.   But  
there's nothing in the docs to suggest that mod_proxy does anything  
with Cache-Control...


I've Googled quite a bit and have found other people with similar  
issues but all the ones I found went unanswered.  Seems I've found a  
hard-to-solve problem.  Lucky me. :)


janine

What Apache caches:

http://pug.furfly.com:8080/public/index?
MIME-Version: 1.0
Date: Mon, 13 Apr 2009 17:34:43 GMT
Server: AOLserver/4.0.10
Content-Type: text/html; charset=utf-8
Content-Length: 127358
Set-Cookie: ad_session_id=82810314%2c0%2c0+ 
%7b504+1239645283+E08EA2C07D8750971544D8B6671200EAF699C98D%7d; Path=/;  
Max-Age=1200


User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)  
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1

Cache-Control: max-age=0
Accept: text/xml,application/xml,application/xhtml+xml,text/ 
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us
Accept-Encoding: gzip, deflate
Cookie: __qca=482b4ca6-9b388-0907d-155ca;  
__utma=146890400.1264817709.1186083344.1190161690.1203300241.4;  
__utma 
=69865361.424306058273248.1238996261.1239575290.1239642259.7;  
__utmc=69865361; __utmz=69865361.1238996261.1.1.utmcsr=(direct)| 
utmccn=(direct)|utmcmd=(none); ad_session_id=82810314%2c0%2c0+ 
%7b875+1239644942+FC98624F29A05DF429C7EEDE1E3233089A2BF039%7d;  
JSESSIONID=1428D1022033F5CAB31B6FDA6F349021

Host: pug.furfly.com:8080
X-Forwarded-For: 173.50.249.21
X-Forwarded-Host: pug.furfly.com:8080
X-Forwarded-Server: pug.furfly.com

What telnet receives:

GET /public/index HTTP/1.0

HTTP/1.1 200 OK
Date: Mon, 13 Apr 2009 17:36:00 GMT
Server: Apache/2.2.11 (Unix)
Set-Cookie: ad_session_id=82810314%2c0%2c0+ 
%7b504+1239645283+E08EA2C07D875097154

4D8B6671200EAF699C98D%7d; Path=/; Max-Age=1200
MIME-Version: 1.0
Content-Length: 127358
Age: 77
Connection: close
Content-Type: text/html; charset=utf-8




On Apr 13, 2009, at 5:36 AM, Mark Aufflick wrote:


Hi Janine,

The key with Apache documentation is to know which module is going to
do what you want. Once you've figured that out, the docs are quite
clear (with the exception of mod_rewrite of course :)

In this case I happen to know that the Cache-control header is
generated by mod_expires, and you will find how to control it here:

http://httpd.apache.org/docs/2.0/mod/mod_expires.html

Your httpd config might have expiration set by default, or by file  
extension.


Mark.

On Mon, Apr 13, 2009 at 9:32 AM, Janine Sisk jan...@furfly.net  
wrote:

This is only peripherally related to AOLserver, but there are so many
helpful and knowledgeable people on this list, I'm hoping someone  
will

recognize this.
I'm still working on that Apache/Tomcat caching thing I wrote about  
a few
days ago.  The client is insisting on Apache and nothing but  
Apache, so I

haven't investigated Squid, Varnish or anything else so far.
I figured out how to use mod_cache to get Apache to cache the  
content, but
it's kind of useless because there's a Cache-Control:  max-age=0  
header
that causes it to request a new copy every time.  The problem is, I  
can't

figure out where it's coming from.
I've eliminated Tomcat from the loop entirely, so the fault lies  
somewhere

between AOLserver and Apache:
- telnet to AOLserver directly - no cache-control at all
GET /public/index HTTP/1.0
HTTP/1.0 200 OK
Set-Cookie:
ad_session_id=82810106%2c0%2c0+ 
%7b514+1239579021+56A366FC5E92AF28DB87E48214C6C4CE8C0581BB%7d;

Path=/; Max-Age=1200
MIME-Version: 1.0
Date: Sun, 12 Apr 2009 23:10:21 GMT
Server: AOLserver/4.0.10
Content-Type: text/html; charset=utf-8
Content-Length: 127358
Connection: close
- have Apache send request to AOLserver via mod_proxy  
(ProxyPassMatch) - has

Cache-Control with max-age=0
Last-Modified: Mon, 30 Mar 2009 11:26:14 GMT
MIME-Version: 1.0
Date: Sun, 12 Apr 2009 23:03:02 GMT
Server: AOLserver/4.0.10
Content-Type: image/gif
Content-Length: 395
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/ 
525.27.1

Referer: http://pug.furfly.com:8080/public/index

Re: [AOLSERVER] More on caching content...

2009-04-13 Thread David Walker
To aid your troubleshooting, I would recommend a grep or other full-text
search of the code running on AOLServer to determine if there are any
circumstances where it would generate a cache-control header.

Your telnet test may not give you all of the data you desire without a
full set of headers on the request side.  The Tamper Data add-on for
Firefox will allow you to observe the interaction (headers and all)
between your browser and the web server.

The CacheIgnoreCacheControl directive may allow you to force Apache to
cache regardless of whether there is a cache-control directive.

http://httpd.apache.org/docs/2.0/mod/mod_cache.html

Janine Sisk wrote:
 This is only peripherally related to AOLserver, but there are so many
 helpful and knowledgeable people on this list, I'm hoping someone will
 recognize this.

 I'm still working on that Apache/Tomcat caching thing I wrote about a
 few days ago.  The client is insisting on Apache and nothing but
 Apache, so I haven't investigated Squid, Varnish or anything else so far.

 I figured out how to use mod_cache to get Apache to cache the content,
 but it's kind of useless because there's a Cache-Control:  max-age=0
 header that causes it to request a new copy every time.  The problem
 is, I can't figure out where it's coming from.

 I've eliminated Tomcat from the loop entirely, so the fault lies
 somewhere between AOLserver and Apache:

 - telnet to AOLserver directly - no cache-control at all

 GET /public/index HTTP/1.0

 HTTP/1.0 200 OK
 Set-Cookie:
 ad_session_id=82810106%2c0%2c0+%7b514+1239579021+56A366FC5E92AF28DB87E48214C6C4CE8C0581BB%7d;
 Path=/; Max-Age=1200
 MIME-Version: 1.0
 Date: Sun, 12 Apr 2009 23:10:21 GMT
 Server: AOLserver/4.0.10
 Content-Type: text/html; charset=utf-8
 Content-Length: 127358
 Connection: close

 - have Apache send request to AOLserver via mod_proxy (ProxyPassMatch)
 - has Cache-Control with max-age=0

 Last-Modified: Mon, 30 Mar 2009 11:26:14 GMT
 MIME-Version: 1.0
 Date: Sun, 12 Apr 2009 23:03:02 GMT
 Server: AOLserver/4.0.10
 Content-Type: image/gif
 Content-Length: 395

 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
 AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
 Referer: http://pug.furfly.com:8080/public/index
 *Cache-Control: max-age=0*
 Accept: */*
 Accept-Language: en-us
 Accept-Encoding: gzip, deflate

 - use mod_headers to add a Cache-Control header - now we have two:

 Last-Modified: Mon, 30 Mar 2009 11:26:14 GMT
 MIME-Version: 1.0
 Date: Sun, 12 Apr 2009 23:15:04 GMT
 Server: AOLserver/4.0.10
 Content-Type: image/gif
 Content-Length: 395
 *Cache-Control: max-age=999*

 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
 AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
 Referer: http://pug.furfly.com:8080/public/index
 *Cache-Control: max-age=0*
 Accept: */*
 Accept-Language: en-us
 Accept-Encoding: gzip, deflate


 It appears that Apache is adding the rogue header, but I don't know
 how to tell it to stop!

 Any suggestions?

 janine

 ---
 Janine Sisk
 President/CEO of furfly, LLC
 503-693-6407




 -- AOLserver - http://www.aolserver.com/

 To Remove yourself from this list, simply send an email to
 lists...@listserv.aol.com with the body of SIGNOFF AOLSERVER in
 the email message. You can leave the Subject: field of your email blank.




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
lists...@listserv.aol.com with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] More on caching content...

2009-04-13 Thread Mark Aufflick
wow that is odd.

Do you want to post your httpd.conf as an attachment?

On Tue, Apr 14, 2009 at 4:06 AM, Janine Sisk jan...@furfly.net wrote:
 Mark, thanks for the tip - it sounded logical but unfortunately doesn't seem
 to be the case.  I didn't have any expire directives in the conf file but I
 added this anyway:
 ExpiresActive On
 ExpiresDefault M86400
 and it doesn't seem to be making any difference.  I tried commenting out the
 code for mod_headers and then the first Cache-Control line is missing, but
 the one with max-age=0 is still there.
 just for grins, I tried using telnet to request the URL instead of going to
 it in the browser.  I then found the corresponding header in Apache's cache
 (this one is the actual HTML, the rest are all images), so it's more of an
 apples-to-apples comparison.  Both are below.  The interesting thing is that
 the cached header includes a lot more information, including the erroneous
 Cache-Control: max-age=0.  Some of it comes from mod_proxy, specifically
 the X-Forwarded part.   But there's nothing in the docs to suggest that
 mod_proxy does anything with Cache-Control...
 I've Googled quite a bit and have found other people with similar issues but
 all the ones I found went unanswered.  Seems I've found a hard-to-solve
 problem.  Lucky me. :)
 janine
 What Apache caches:
 http://pug.furfly.com:8080/public/index?
 MIME-Version: 1.0
 Date: Mon, 13 Apr 2009 17:34:43 GMT
 Server: AOLserver/4.0.10
 Content-Type: text/html; charset=utf-8
 Content-Length: 127358
 Set-Cookie:
 ad_session_id=82810314%2c0%2c0+%7b504+1239645283+E08EA2C07D8750971544D8B6671200EAF699C98D%7d;
 Path=/; Max-Age=1200
 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
 AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
 Cache-Control: max-age=0
 Accept:
 text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
 Accept-Language: en-us
 Accept-Encoding: gzip, deflate
 Cookie: __qca=482b4ca6-9b388-0907d-155ca;
 __utma=146890400.1264817709.1186083344.1190161690.1203300241.4;
 __utma=69865361.424306058273248.1238996261.1239575290.1239642259.7;
 __utmc=69865361;
 __utmz=69865361.1238996261.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
 ad_session_id=82810314%2c0%2c0+%7b875+1239644942+FC98624F29A05DF429C7EEDE1E3233089A2BF039%7d;
 JSESSIONID=1428D1022033F5CAB31B6FDA6F349021
 Host: pug.furfly.com:8080
 X-Forwarded-For: 173.50.249.21
 X-Forwarded-Host: pug.furfly.com:8080
 X-Forwarded-Server: pug.furfly.com
 What telnet receives:
 GET /public/index HTTP/1.0
 HTTP/1.1 200 OK
 Date: Mon, 13 Apr 2009 17:36:00 GMT
 Server: Apache/2.2.11 (Unix)
 Set-Cookie:
 ad_session_id=82810314%2c0%2c0+%7b504+1239645283+E08EA2C07D875097154
 4D8B6671200EAF699C98D%7d; Path=/; Max-Age=1200
 MIME-Version: 1.0
 Content-Length: 127358
 Age: 77
 Connection: close
 Content-Type: text/html; charset=utf-8



 On Apr 13, 2009, at 5:36 AM, Mark Aufflick wrote:

 Hi Janine,

 The key with Apache documentation is to know which module is going to
 do what you want. Once you've figured that out, the docs are quite
 clear (with the exception of mod_rewrite of course :)

 In this case I happen to know that the Cache-control header is
 generated by mod_expires, and you will find how to control it here:

 http://httpd.apache.org/docs/2.0/mod/mod_expires.html

 Your httpd config might have expiration set by default, or by file
 extension.

 Mark.

 On Mon, Apr 13, 2009 at 9:32 AM, Janine Sisk jan...@furfly.net wrote:

 This is only peripherally related to AOLserver, but there are so many

 helpful and knowledgeable people on this list, I'm hoping someone will

 recognize this.

 I'm still working on that Apache/Tomcat caching thing I wrote about a few

 days ago.  The client is insisting on Apache and nothing but Apache, so I

 haven't investigated Squid, Varnish or anything else so far.

 I figured out how to use mod_cache to get Apache to cache the content, but

 it's kind of useless because there's a Cache-Control:  max-age=0 header

 that causes it to request a new copy every time.  The problem is, I can't

 figure out where it's coming from.

 I've eliminated Tomcat from the loop entirely, so the fault lies somewhere

 between AOLserver and Apache:

 - telnet to AOLserver directly - no cache-control at all

 GET /public/index HTTP/1.0

 HTTP/1.0 200 OK

 Set-Cookie:

 ad_session_id=82810106%2c0%2c0+%7b514+1239579021+56A366FC5E92AF28DB87E48214C6C4CE8C0581BB%7d;

 Path=/; Max-Age=1200

 MIME-Version: 1.0

 Date: Sun, 12 Apr 2009 23:10:21 GMT

 Server: AOLserver/4.0.10

 Content-Type: text/html; charset=utf-8

 Content-Length: 127358

 Connection: close

 - have Apache send request to AOLserver via mod_proxy (ProxyPassMatch) - has

 Cache-Control with max-age=0

 Last-Modified: Mon, 30 Mar 2009 11:26:14 GMT

 MIME-Version: 1.0

 Date: Sun, 12 Apr 2009 23:03:02 GMT

 Server: AOLserver/4.0.10

 Content-Type: image/gif

 Content-Length: 395

 User-Agent: 

Re: [AOLSERVER] More on caching content...

2009-04-13 Thread Tom Jackson
Go to: http://www.junom.com/gitweb/gitweb.perl?p=aolserver.git

It has a grep function built into every page, works great for exactly
this case...looking for all instances of a text string. But it also
presents a hyperlink result page. 

For old versions of the code, it seems like the  pickaxe feature is
helpful.

Note: use the top level directory for searches and make sure you are
useing grep or pickaxe if you get no results. 

I doubt there is anything which specifically sets cache-control in
aolserver. 

tom jackson

On Mon, 2009-04-13 at 14:47 -0500, David Walker wrote:
To aid your troubleshooting, I would recommend a grep or other full-text
search of the code running on AOLServer to determine if there are any
circumstances where it would generate a cache-control header.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
lists...@listserv.aol.com with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.