Missing quotation mark in .htaccess line
plates - July 10, 2008 - 22:14
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | base system |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Description
In the .htaccess file provided with 6.3 (and also 6.x-dev and 7.x-dev, but not 5.8), there is a line that reads:
<Files favicon.ico>
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>As you can see, it's missing the ending quotation mark. I'm not sure if this makes a difference or not, but it's throwing the color syntax highlighter of my text editor off.

#1
I've got a default htaccess from 6.2 and 6.3, and they don't have that line.
A module must have added it?
#2
No, a module did not add it. This is straight from the download page off of drupal.org, and you can see it here:
http://cvs.drupal.org/viewvc.py/drupal/drupal/.htaccess?revision=1.94&vi...
#3
It's not a bug.
Apache 1.3:
ErrorDocument 403 "Sorry can't allow you access todayApache 2.0
ErrorDocument 403 "Sorry can't allow you access today"#4
Related: #295456: Bug in .htaccess file.
#5
I propose the following lines to be added after this ErrorDocument. Fixes vim highlighting and probably others. Patch is attached.
#" This quote makes editors syntax highlighting happy
# and ErrorDocument of both Apache 1.3 and 2.x is still supported.
#6
Proposed fix works for me in TextMate. Patch applies cleanly, too.
#7
I'd guess that an editor with a better parser would not consider a quotation mark in a comment as ending one before the comment (unless .htaccess allows for multiline text, in which case the #line might as well be part of the message). I am passing this on to 7.x for debate.
#8
I'm not real eager to commit this, personally. It's a minor annoyance that only applies to a few select text editors out there, in a file that is hardly ever opened by anyone.
Though we could probably use a comment there that says "This is not a bug" since this has come up at least twice now.
#9
Yep, let's just add a comment explaining that this is not a bug.
#10
Also note that the less changes we make to the .htaccess, robots.txt, etc. files in a stable version, the less hassle for our users. Lots of our users make custom modifications to these files, and releasing a new .htaccess just to add a syntax highlight fix for vim does not seem like the best idea to me to bother people to diff with .htaccess files while updating their Drupal 6. One more thing to think about.
#11
I silently marked #291336: ErrorDocument in .htaccess is missing closing quote, #297024: htacces missing dbl quote in string and #290356: Add end quote to ErrorDocument 404 for favicon.ico as a duplicate of this one during the last few weeks. I'm a little fed up by the issue, so let's add a comment for this.
#12
@10 - I've been thinking for a while that it would be really useful on each Drupal release page to make clear which of the customisable files in core (.htaccess, robots.txt, settings.php ... are there any others?) have actually changed (or if any changes are substantive). Frequently these don't change between minor releases so you can use an existing modified copy from the previous version if necessary. I think that being absolutely clear to users about whether .htaccess etc. from their current installation can be used, or not, would greatly reduce confusion and potentially make upgrading easier, therefore we would see fewer sites running old versions. Personally, I use cvs.d.o to check for any changes in these files but I doubt most people do that.
Any thoughts (apart from the fact that this needs a new issue somewhere, not sure where!)?
#13
I recall reading upgrade paths stating no htaccess change is required so I can keep the modified old one
with that being clear on each release would be enough (even it might be stated that there were minor changes, but only aesthetic ones)
it seems to me that being an infrequently visited file is not a valid argument, since it might be otherwise a pro argument, visiting the file should be clean and self-explanatory and with the most common editors
if adding such a comment would fix some editors' highlighting I think it should be added
is just a comment that will not harm and will document a backward compatibility issue (two birds in one shot)
those who have customized htaccess will keep their versions
those who complained about the unmatching quote would have an explanation
those who doesn't care about Apache 1.3 might simply close the quote
those with highlighting problems will be happy
no harm, all pros, right?
#14
No, we don't include workarounds in core for various text editors' quirks. If we did, we'd also include vim modelines and stuff like that... it would be a giant mess.
Still awaiting a patch that explains this is by design, to help cut down on future duplicate bug reports.
#15
Ok, lets get this committed, I'm fed up of having to mark duplicate issues.
#16
The patch also ups the PostgeSQL version.
+ # There is voluntary no end quote below, for compatibility with Apache 1.3I'm not sure "voluntary" is needed; seems like this line would be fine without that word.
#17
Oups.
#18
Looks good.
#19
Committed to CVS HEAD and DRUPAL-6. Thanks.
#20
Automatically closed -- issue fixed for two weeks with no activity.