0

This is my http.confg file:

Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>
<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
Include /etc/phpmyadmin/apache.conf

This is my .htaccess file:

<FilesMatch "\.(xml)$">
Header unset ETag
FileETag None
Header set Cache-Control "max-age= 300, public"
</FilesMatch>

This is the link I'm experimenting on : ` http://ec2-54-226-158-192.compute-1.amazonaws.com/LiveTV.xml

(1) When I first direct to this link on Mozilla Firefox,

this is what I listen on the server side: enter image description here

and this is what I gather on the client side, using wire-shark.enter image description here

(2) Now I send the request again:

this is what I listen on the server side:enter image description here

and this is what I gather on the client side, using wire-shark.enter image description here

(3) When the max-age expires, I send the request again:

this is what I listen on the server side: enter image description here

and this is what I gather on the client side, using wire-shark. enter image description here

My Questions over here are :

  • Why am I getting Cache-Control: max-age=0 on the server side ?

  • Shouldn't I get 200 response after the max-age expires? Why am I getting 304 status code on the first request after max-age expires?

Danish Bin Sofwan
  • 476
  • 1
  • 6
  • 21

0 Answers0