What is performing Transparent Content Negotiation in Apache

tomfumb

I inherited a fairly complex Java web application that exhibits a mysterious behaviour and I need to know what causes it.

The application requests a file file.css. If file.css exists it is returned. If file.css does not exist, but file.css.gz does exist, the gzipped file is returned, with the following unusual headers:

Content-Location: file.css.gz
Content-Type: application/x-gzip
TCN: choice
Vary: negotiate

The presence of the TCN header means that a request was transparently negotiated, most likely by an Apache RewriteRule, but I can't find where the rule is defined. I've located and searched every Apache config file on the server (multiple files are referenced with Include) and commented-out every mention of "gzip" or ".gz". Across all config files there is only a single RewriteRule and it's for SSL. After restarting Apache I still can't disable the behaviour.

Is this the default behaviour of Apache, or does this look like the behaviour of a certain module?

The server's OS is RHEL 5.8, Apache is 2.2.

tomfumb

The culprit was Apache MultiViews. This was a frustrating investigation because configuring MultiViews involves no mention of RewriteRule or any of the file extensions it will automatically substitute. You have to already know about MultiViews before you can understand that it is causing this behaviour.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Content negotiation to return HTML

From Dev

PhalconPHP: content negotiation?

From Dev

Restlet Content Type Negotiation

From Dev

Content negotiation using WebSharper

From Dev

PhalconPHP: content negotiation?

From Dev

What is Service Credentials Negotiation?

From Dev

What is Service Credentials Negotiation?

From Dev

Spring boot controller content negotiation

From Dev

Jersey - content negotiation for error handling

From Dev

Spring MVC Content Negotiation throwing ClassCastException

From Dev

SupportedMediaTypes not used when doing content negotiation

From Dev

Why not use content negotiation to return JSON object?

From Dev

How to Use Content Negotiation in Spring Data Rest?

From Dev

How to disable content negotiation for Spring Actuators?

From Dev

Content Negotiation when looking at different output formats

From Dev

Content negotiation for File Download In Web API

From Dev

Is there a simple way to solve content negotiation in Spring boot

From Dev

How to Use Content Negotiation in Spring Data Rest?

From Dev

Content negotiation not working with respond_to stanza

From Dev

SwingNode with transparent content

From Dev

Does HTTP content negotiation respect media type parameters

From Dev

spring cloud config-server .properties content-negotiation failing

From Dev

Is there better approach to Accept Header based content negotiation in Spring API?

From Dev

Why would HTTP content negotiation be preferred to explicit parameters in an API scenario?

From Dev

Is HTTP content negotiation being used by browsers and servers in practice?

From Dev

How to add csv MimeType to spring content-negotiation?

From Dev

Apache: redirect to non SSL page if TLS negotiation fails

From Dev

Apache SSL error: Re-negotiation handshake failed: Not accepted by client?

From Dev

What does performing a byteswap mean?

Related Related

  1. 1

    Content negotiation to return HTML

  2. 2

    PhalconPHP: content negotiation?

  3. 3

    Restlet Content Type Negotiation

  4. 4

    Content negotiation using WebSharper

  5. 5

    PhalconPHP: content negotiation?

  6. 6

    What is Service Credentials Negotiation?

  7. 7

    What is Service Credentials Negotiation?

  8. 8

    Spring boot controller content negotiation

  9. 9

    Jersey - content negotiation for error handling

  10. 10

    Spring MVC Content Negotiation throwing ClassCastException

  11. 11

    SupportedMediaTypes not used when doing content negotiation

  12. 12

    Why not use content negotiation to return JSON object?

  13. 13

    How to Use Content Negotiation in Spring Data Rest?

  14. 14

    How to disable content negotiation for Spring Actuators?

  15. 15

    Content Negotiation when looking at different output formats

  16. 16

    Content negotiation for File Download In Web API

  17. 17

    Is there a simple way to solve content negotiation in Spring boot

  18. 18

    How to Use Content Negotiation in Spring Data Rest?

  19. 19

    Content negotiation not working with respond_to stanza

  20. 20

    SwingNode with transparent content

  21. 21

    Does HTTP content negotiation respect media type parameters

  22. 22

    spring cloud config-server .properties content-negotiation failing

  23. 23

    Is there better approach to Accept Header based content negotiation in Spring API?

  24. 24

    Why would HTTP content negotiation be preferred to explicit parameters in an API scenario?

  25. 25

    Is HTTP content negotiation being used by browsers and servers in practice?

  26. 26

    How to add csv MimeType to spring content-negotiation?

  27. 27

    Apache: redirect to non SSL page if TLS negotiation fails

  28. 28

    Apache SSL error: Re-negotiation handshake failed: Not accepted by client?

  29. 29

    What does performing a byteswap mean?

HotTag

Archive