The new clean URL test[1] in 4.6 causes problems for sites using HTTP auth. The call to /system/test through drupal_http_request() fails because the username/password is unknown to Drupal.

Moshe proposed the following:

we could resolve this by having the user's browser do the check instead of the server. basically, use an Only local images are allowed. tag to do the test and instead of just returning 200 in the response, the server sets a variable indicating that clean url is OK. so on the first view of admin/settings, everyone sees disabled ... this is just one of many possible solutions.

[1] http://drupal.org/node/12384

Comments

Junyor’s picture

I just looked around a little bit to see if there's some way we could just set a variable via the .htaccess file if mod_rewrite is enabled and check that, but I didn't see any way to do that. I suppose Moshe's solution would work, but we'd need to put a note in the settings page to reload it if you want to toggle Clean URL support.

Anonymous’s picture

Steven’s picture

HTTP auth returns a 401 status code right? We can easily check for that, but I wonder if it will still return 404s for non-existant files.

Junyor’s picture

Yes, I believe HTTP auth returns a 401. But it returns a 401 even if the file doesn't exist if you're not authenticated.

Could we do a check for a 401 and if that's the return value, give the user a chance to manually test? Alternatively, we could just say the test could not be performed and leave the radio buttons enabled.

Junyor’s picture