lukenowak opened a new issue, #11784:
URL: https://github.com/apache/trafficserver/issues/11784

   Initially the backend replies with response like:
   
   ```
   HTTP/1.1 200 OK
   Date: Mon, 23 Sep 2024 14:22:14 GMT
   X-Reveal-Duplicate: same
   Cache-Control: max-age=30, stale-if-error=604800, stale-while-revalidate=15, 
public
   Content-Length: 14475
   Content-Type: application/javascript
   Expires: Mon, 23 Sep 2024 14:22:44 GMT
   Last-Modified: Mon, 23 Sep 2024 14:22:14 GMT
   X-Reveal-Duplicate: other
   ```
   
   For the `TCP_MISS/200` trafficserver query, the reply from traffic server 
has all expected headers:
   
   ```
   HTTP/1.1 200 OK                                                              
                                                                        
   Date: Mon, 23 Sep 2024 14:22:14 GMT
   X-Reveal-Duplicate: same
   Cache-Control: max-age=30, stale-if-error=604800, stale-while-revalidate=15, 
public
   Content-Length: 14475
   Content-Type: application/javascript
   Expires: Mon, 23 Sep 2024 14:22:44 GMT
   Last-Modified: Mon, 23 Sep 2024 14:22:14 GMT
   X-Reveal-Duplicate: other
   Age: 0
   ```
   
   All queries until max-age is reached are the same and correct.
   
   After the max-age time passes trafficserver is doing `TCP_REFRESH_HIT/200` 
to the backend with If-Modified-Since, which replies:
   
   ```
   HTTP/1.1 304 Not Modified
   Date: Mon, 23 Sep 2024 14:25:16 GMT
   X-Reveal-Duplicate: same
   Cache-Control: max-age=30, stale-if-error=604800, stale-while-revalidate=15, 
public
   Content-Type: application/javascript
   Expires: Mon, 23 Sep 2024 14:25:46 GMT
   Last-Modified: Mon, 23 Sep 2024 14:25:16 GMT
   X-Reveal-Duplicate: other
   ```
   
   But then the Trafficserver replies to the client with headers:
   
   ```
   HTTP/1.1 200 OK
   Date: Mon, 23 Sep 2024 14:25:16 GMT
   Content-length: 14475
   X-Reveal-Duplicate: same
   Cache-Control: max-age=30, stale-if-error=604800, stale-while-revalidate=15, 
public
   Expires: Mon, 23 Sep 2024 14:25:46 GMT
   Last-Modified: Mon, 23 Sep 2024 14:25:16 GMT
   X-Reveal-Duplicate: other
   ```
   
   Please see, that it replies without `Content-Type` header, which can be seen 
also in the `squid.log`, as the line is logged like:
   
   `1727101089.801 2 127.0.0.1 TCP_REFRESH_HIT/200 14933 GET http://example.com 
- DIRECT/127.0.0.1 -
   `
   When the duplicated header `X-Reveal-Duplicate` has the same value, it 
results with same problem not transmitting Content-Type.
   
   When the backend replies instead with 200 response to the If-Modified-Since 
then the Content-Type header is correctly transmitted.
   
   Seems like dropping the Content-Type header there is a bug.
   
   Reproduced on trafficserver 9.2.5, configure options:
   
   ```
     --with-openssl=provided-openssl
     --with-pcre=provided-pcre
     --with-ncurses=provided-ncurses
     --with-tcl=provided-tcl
     --with-luajit=provided-luajit
     --with-lzma=provided-xzutils
     --with-zlib=provided-zlib
     --disable-curl
     --disable-hwloc
     --enable-experimental-plugins
     --disable-posix-cap
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to