git://git.jankratochvil.net
/
MyWeb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d28489
)
Workaround http://validator.w3.org/ only if it still does not set: Accept
author
short
<>
Mon, 22 Aug 2005 01:58:41 +0000
(
01:58
+0000)
committer
short
<>
Mon, 22 Aug 2005 01:58:41 +0000
(
01:58
+0000)
Web.pm
patch
|
blob
|
history
diff --git
a/Web.pm
b/Web.pm
index
88b0aff
..
f67c47d
100644
(file)
--- a/
Web.pm
+++ b/
Web.pm
@@
-790,7
+790,7
@@
my($class)=@_;
# Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217
my $mime;
# http://validator.w3.org/ does not send ANY "Accept" headers!
# Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217
my $mime;
# http://validator.w3.org/ does not send ANY "Accept" headers!
- $mime||="application/xhtml+xml" if $W->{"user_agent"}=~m{^W3C_Validator/}i;
+ $mime||="application/xhtml+xml" if
!$W->{"accept"} &&
$W->{"user_agent"}=~m{^W3C_Validator/}i;
$mime||=$class->Negotiate_choose([
# Put the fallback variant as the first one.
# Rate both variants the same to prefer "text/html" for undecided clients.
$mime||=$class->Negotiate_choose([
# Put the fallback variant as the first one.
# Rate both variants the same to prefer "text/html" for undecided clients.